From patchwork Fri Mar 24 14:36:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chester Lin X-Patchwork-Id: 13186824 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1CB53C6FD20 for ; Fri, 24 Mar 2023 14:38:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=G3r7hy9WU4nVaC+UyLOPSsFMSBlyGA6kWxJ482B3J+A=; b=QBlT06tCgvUR4N 9LuSJrECgBoLshUYJ2+Ro7g230p/dJVkYiNku7Oj0ioACi+V2opTRKsF8uY8DDKC65I7PbCuaSrxP jXVT0HTPJiP+IrANBHUafXd9p518Tkv3kfXjL5Bw2pAsekCW0sTLlk+GMJCn+/eGiZZP4I7NL27y3 jcxkphUE4IORWab8lhpEk7dpf6oMou7R0nijpAlhb0cHVz4SDVrrXIgH6mYbldKlyDuLr2lqdSOyL JNRwjxDz2QWqvjV7R6YQ8iHN5yXgoUQnrKdlPbitV6Dp1qIniaOSO72d5Z6yNSifTpl+wyE52XZlO bXUdJ2yGAnmpFpGLU6qw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pfiXV-004eZo-2U; Fri, 24 Mar 2023 14:37:09 +0000 Received: from mail-am6eur05on20614.outbound.protection.outlook.com ([2a01:111:f400:7e1b::614] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pfiXS-004eYO-2B for linux-arm-kernel@lists.infradead.org; Fri, 24 Mar 2023 14:37:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XQ1odqTm9wAiVm8jgnWSwTuwRokr+9WZCxvBxTxezJpj91gpkoQYS4mOO8kVBMxgQewI8CtTjDFEN9+ugJbuA7ryDIF/kE7IBQMSg+XNc2V50Thkf4yLQV5YMKyTfaFntk5MtKoCnE78Zvo0ZO5DcRpcdKlEsE5mCtOJ/lRYvQG6hBmNjNcwE93m9glRsoaN38nTUEH215/jmI/pIatJtuNfGZjh+NeSrpmcGmFEeDUA9wmftWi6Q6SUkHCvVzJzuj/yUxcYN7kQ+1RHMuoYq6RByHph5hjTAOTLCe35ideand76kX3A+ZlskO+uztvlRHh7whbjbgtPy28BFZricg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=lVsHlmmOZnH5Pscvqqk8V4t+npY30iT2/Gs3LMFbQbg=; b=Oe8MKqE1TdxcwtzZbKK2VsHKQWHZKOPzEPR2U6sHQZ95hunFDuzU+uMW9297dZYmv9tW7LZjxtxYXWo2V+XftXYbD5RcN1XlpEaqJF+cWkWuqYqAkYUxA+xG8bG0PDpRsAhLuHZbs7sEZcJwAP36rn7T5gHCjZ4VnFDPb+gbNqDkNCEor06fcOuvIlVbAUG2KYucF+i1FtWv3EPnJu0Y8TrTtZaZ97FnqG+NOc3rlFLA3/WyTUK9kDLaOFttGBClqrljgWQS94K2+g/BoBV+Wl3IUTYCprq4DiVaK5Bj6qDw+mhoT/iljWWaJ76zP5JLSQ1fREw9slZG0HZ2JTZGCA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lVsHlmmOZnH5Pscvqqk8V4t+npY30iT2/Gs3LMFbQbg=; b=Ni80TAgACUJJFGEIXp94w1fT7TGwh5g+YfAPl0FhKE8Armo1sbRNpPaCaR3ZbfQEX4lOCn8UcQ9ZijM7drULp4Wzp4D9RsCDWPL9acIdNATRWdlJOrUT6lbS19raMXfZMUgWCLPWMrBla4K3MNHqJSIImv5BeqzEtC4poREG/IAGJtooWQO6RntEVBy4ILWWs99L58d5lu2cjilk9bg/Ta/fVjUH+dt7txy+hcRrCBz32U0fbBt58V4ffWViM9xzFtGReaHDAOYmwrS2lRiiwtnIzFAvpj6E6zTuDAkVjNmgQGB0ksyHg301kLfOOc3j+esv4LfrEjyWKjQmVMZiIA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Received: from VI1PR0402MB3439.eurprd04.prod.outlook.com (2603:10a6:803:4::13) by VE1PR04MB7454.eurprd04.prod.outlook.com (2603:10a6:800:1a8::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.38; Fri, 24 Mar 2023 14:37:01 +0000 Received: from VI1PR0402MB3439.eurprd04.prod.outlook.com ([fe80::6802:b2c3:5f12:8f9f]) by VI1PR0402MB3439.eurprd04.prod.outlook.com ([fe80::6802:b2c3:5f12:8f9f%2]) with mapi id 15.20.6178.038; Fri, 24 Mar 2023 14:37:00 +0000 From: Chester Lin To: Linus Walleij , Andy Shevchenko Cc: Chester Lin , NXP S32 Linux Team , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ghennadi Procopciuc , Andrei Stefanescu , Radu Pirea , =?utf-8?q?Andreas_F=C3=A4rber?= , Matthias Brugger Subject: [PATCH v4 0/5] pinctrl: s32: driver improvements and generic struct use Date: Fri, 24 Mar 2023 22:36:21 +0800 Message-Id: <20230324143626.16336-1-clin@suse.com> X-Mailer: git-send-email 2.37.3 X-ClientProxiedBy: TYCPR01CA0013.jpnprd01.prod.outlook.com (2603:1096:405::25) To VI1PR0402MB3439.eurprd04.prod.outlook.com (2603:10a6:803:4::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR0402MB3439:EE_|VE1PR04MB7454:EE_ X-MS-Office365-Filtering-Correlation-Id: 8923ee34-99b9-4cc8-538b-08db2c753a5a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tkwYg5EAx4GJ9gxthv7W/1gE7z8CX+7GJjS9Z775QBtq99XSTMYlTQ91mo5bs2qZucSTQHb4WFR0NKTLwtrhdS5lA0iRL0wpaUZ1HYxpHLpFpTbY+LB+hmMLE0CIJ2CuA8l4Ra5LWtkHYCSGFmTyPWvssf4NgIPBOmDy5GIgjZumM8Vl/776rK/8L6gaF6RQl6bSUB8TQY2R8Kios/e8geux1Bx3SDKxNKgiro8/Z+E+QXtjYcXryGuX2Z2ukJGnDwAo+ieCELPW5kKyJIkSs9FrF29ZzPGbbjPPlMg+4SZU4ni3otBrdw85xxyHJ1lbCcoyg7xpEt1Obk6n3R6IdBnN1geHWymXFSmil4YlU+fGtrX68008eEHSTTrNN6kb8RJodgtr3tkZfTq9ypLOrugpgQorMW8nmKAqMN8374aepto3HuBBB//XgxvATkUPnKJpI7b0Wrv2rwtW48ifR0afaNvaEw7I2xflL/md9213PP4AvLK/18e4Ye/0rwIwiH5TCfUA+E7uG8USRysFIlClCp6Gm9BJNeY0q/kf9wkRkwJs0U6Bnlkg77SlxIbGZ+rhOait2oqEccmdQ67stmje/0j0ZLurMPKZ5OZXNIZMJHJ1+jUYYiT479W1bBtyy6+/zYXb5JbuV8rVSQqUnFQgJn/pJ9+3T+DEuACwCE5XGDRWa59B+W8M16BUDJmUasZvIM41BNfIKw9Qh3CfOMBhZlyTuOjWSJ+pDGCSOzk= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR0402MB3439.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(346002)(396003)(366004)(136003)(376002)(39850400004)(451199018)(8936002)(66946007)(66476007)(66556008)(41300700001)(4326008)(86362001)(8676002)(36756003)(38100700002)(6506007)(1076003)(6512007)(6666004)(26005)(83380400001)(186003)(2616005)(107886003)(316002)(6486002)(54906003)(110136005)(478600001)(966005)(5660300002)(7416002)(2906002)(41533002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NY+p1HaURysRTaeClMHR/6ZI0aLXTgCvd0YuoDyeJOMXDdcTKs7Mzoqy4esivKhPcpaX077Mny4DcvdD+O0qAxRRf6a6gYBFL7rdaBQoMzpyX31vEI2PHlbgoNaOll89v5QcJzTUo4T/IT587XfpkzP2MaEcXTI5SI9gna/lReYT7LeYexS0S8u1Xna1GoVwOcKuIIVrcv5YVLvRnHWHKyOxdV+cgMwrDvvD3oKEXCLYSo1txtBzYV2KA7xTRIiomLp4/tsMMsbjzvPiZKwVxSplHiGMGNMMfIrSDrEopjhpN2783vYXv6Pp1OOEVUDDa888heT4n4jMDFX/JmzUh+LmGuhveT7u5KbV3r8O1uEpM19aWV9iyIroLE5Wn9dzpBW6fCXz3AslsvvLxfEawHNEwE7AEsjgJQjFhi+2dsH8SX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eQ4JhABmocDQrzEIx83pJ2k251TuG29/Z+5utC6IaCoqclVDHaKf0uLuh1zKYw140xdgZD7xlVKg+3oFk= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8923ee34-99b9-4cc8-538b-08db2c753a5a X-MS-Exchange-CrossTenant-AuthSource: VI1PR0402MB3439.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Mar 2023 14:37:00.6725 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: FgqlkK4GL8XgUiILzgfizpzHJaZML/RAA/vHC+djtBZ0BhXwyhzyvr7DT5bOdZ2x X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7454 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230324_073706_933763_E10B0B47 X-CRM114-Status: GOOD ( 10.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, This patch series contains some improvements for s32 pinctrl drivers suggested by upstream[1], such as - Fix error shadowings and improve return value handlings. - Fix print format. - Remove unnecessary blanks. - Use proper macros and helpers to simplify codes. - Refactor config param parsing and remove config arguments that are never used. - Use generic struct pingroup and struct pinfunction to describe pin data. Regards, Chester [1] https://lore.kernel.org/all/20230220023320.3499-1-clin@suse.com/ Changes in v4: - Merge the of_device_get_match_data() patch [v3 1/6] into the last patch [v4 5/5, "pinctrl: s32: separate const device data ..."] in order to solve compiler warning properly. Changes in v3: - Link: https://lore.kernel.org/lkml/20230323144833.28562-1-clin@suse.com/ - Remove unnecessary type casting and correct type qualifiers. - Split the previous generic-struct patch [v2 4/4] into two separate patches. - Add a new patch [v3 6/6] to attach a real const .data with of_device_id. Changes in v2: - Link: https://lore.kernel.org/lkml/20230320163823.886-1-clin@suse.com/ - Use of_device_get_match_data() to get matched of_device_id data. - Enhance sizeof() arguments. - Fix blanks and remove unnecessary parentheses. - Drop unnecessary marcos and s32_pin_config() implemented in v1 and set/clear mask/config values transparently. - Put pull-function related cases together in s32_pin_set_pull(). - Simply use generic 'struct pinfunction' rather than having extra 'struct s32_pmx_func'. Chester Lin (5): pinctrl: s32: refine error/return/config checks and simplify driver codes pinctrl: s32cc: refactor pin config parsing pinctrl: s32cc: embed generic struct pingroup pinctrl: s32cc: Use generic struct data to describe pin function pinctrl: s32: separate const device data from struct s32_pinctrl_soc_info drivers/pinctrl/nxp/pinctrl-s32.h | 40 ++-- drivers/pinctrl/nxp/pinctrl-s32cc.c | 282 ++++++++++++++++------------ drivers/pinctrl/nxp/pinctrl-s32g2.c | 17 +- 3 files changed, 178 insertions(+), 161 deletions(-)