From patchwork Mon Apr 19 08:17:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12211065 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96674C43460 for ; Mon, 19 Apr 2021 08:17:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 709F46101C for ; Mon, 19 Apr 2021 08:17:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234613AbhDSISF (ORCPT ); Mon, 19 Apr 2021 04:18:05 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50408 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbhDSISD (ORCPT ); Mon, 19 Apr 2021 04:18:03 -0400 Received: from mail-ed1-f71.google.com ([209.85.208.71]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lYP63-0007se-Kb for linux-omap@vger.kernel.org; Mon, 19 Apr 2021 08:17:31 +0000 Received: by mail-ed1-f71.google.com with SMTP id o4-20020a0564024384b0290378d45ecf57so10849656edc.12 for ; Mon, 19 Apr 2021 01:17:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=g3LUGEJmp+br9C+4Vo+YUNsyCt/PXk3aFn54roSqdS8=; b=ipcIKuqC2eZR5xCiCBs2thPXT7OPmtB819aueokUvk5lZExLgk/j5AmASeT93KCQO9 1XWSTkASQPYqYfr3M6921ywTGbOOvWCAhhWUgcAsrvEmOeUmYXeUrZa1S91znTnYay0+ bTGnDogbBne/LzqSHaWCYkX7TlN73BVJd3PlLTjmi3rwt1qB2dh4CgYqwT+RAZMYmdMq vIoMC4+PJILoLTAfZ2y6tRW+NTWrhdafW1XZ90RTyfbbtxQr2jmpkbcqfma/tTCtb/Yz hd2X/rK6/kel+/rF35o5xEJRj1uqRs434Sjre+o2ZX8kh9qPj0z+w7ClgXiwUw1echLL zhhw== X-Gm-Message-State: AOAM532XLjbDaoVGkkT0lr9/KZAZiJ76/kddtwiOus2xmLzpAB7mFrg+ phaB+5nyHmDUXNwyhz3SWxHUM9IF8qLYvZVhoZL1WC8ZDuMr/WcInFODCgD0T9mOtI/+0NibBiE XzHLDoG5GjRsTc5bzN7mfD6bkO3jUSwtwkynN+48= X-Received: by 2002:a17:906:7d82:: with SMTP id v2mr21176585ejo.524.1618820251388; Mon, 19 Apr 2021 01:17:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxy4EtMQXnut0wnOGkwOw0Mdy3TCBQQu/E5EuD6rk7PBrCTRVZtUjf3OIo0bVwGNEkZ4dAKsw== X-Received: by 2002:a17:906:7d82:: with SMTP id v2mr21176578ejo.524.1618820251260; Mon, 19 Apr 2021 01:17:31 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-192-147.adslplus.ch. [188.155.192.147]) by smtp.gmail.com with ESMTPSA id da13sm12384781edb.6.2021.04.19.01.17.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 01:17:30 -0700 (PDT) From: Krzysztof Kozlowski To: Support Opensource , Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Tony Lindgren , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 1/7] mfd: max8997: Simplify getting of_device_id match data Date: Mon, 19 Apr 2021 10:17:20 +0200 Message-Id: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Use of_device_get_match_data() to make the code slightly smaller. Signed-off-by: Krzysztof Kozlowski --- drivers/mfd/max8997.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c index 68d8f2b95287..f89b1eb121c9 100644 --- a/drivers/mfd/max8997.c +++ b/drivers/mfd/max8997.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -145,11 +146,9 @@ static struct max8997_platform_data *max8997_i2c_parse_dt_pdata( static inline unsigned long max8997_i2c_get_driver_data(struct i2c_client *i2c, const struct i2c_device_id *id) { - if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) { - const struct of_device_id *match; - match = of_match_node(max8997_pmic_dt_match, i2c->dev.of_node); - return (unsigned long)match->data; - } + if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) + return (unsigned long)of_device_get_match_data(&i2c->dev); + return id->driver_data; } From patchwork Mon Apr 19 08:17:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12211067 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09600C43461 for ; Mon, 19 Apr 2021 08:17:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D8ACC6113C for ; Mon, 19 Apr 2021 08:17:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234906AbhDSISG (ORCPT ); Mon, 19 Apr 2021 04:18:06 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50418 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233219AbhDSISD (ORCPT ); Mon, 19 Apr 2021 04:18:03 -0400 Received: from mail-ed1-f70.google.com ([209.85.208.70]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lYP64-0007tG-NT for linux-omap@vger.kernel.org; Mon, 19 Apr 2021 08:17:32 +0000 Received: by mail-ed1-f70.google.com with SMTP id w15-20020a056402268fb02903828f878ec5so10755864edd.5 for ; Mon, 19 Apr 2021 01:17:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=52l2YOdVJgJFgazG9TczP/a1+Vn2GICqhmwoQ1rMqI8=; b=FFM3AH9JAsCDBFrZOOOmRjAFANY1DNyPp4hA8MNBQvRMTfXe6w7x/5o2PBAqspjCII AUOZHymFcJd3o9G6kTjlenQrWPZ0OyJLh3M7SpN+6EHNjCqyUCu2o0xNe0S79zzVPQ+c VQnmixl+BboUuria+LnLtEe41IzRDTJSnIgxAPevBcZZ21FRaPQOY2MKc6TCTZ3/HTcx fjuZED217xdSC4CXD4Ucto3UUwY6sZBmwqj5RvgNLkDZCzX7tX3wzxxwWGXJS27VsGDM WDxqt+7fD0hGzs8oKYODcHz1+M8hkEoANGFwA5zfEui7Yq7WVl52LT283qCdkhk24Mio 8ugA== X-Gm-Message-State: AOAM532UvWdVjcI2l7ggXkeVOoNbbtQVt6OwJxGun2Ib5yj6DFIKYIZg OqdSR5/HGZu2/OR4ceAslwIGn847ITkNJN6J9F81YxkgmYM/wwsuHxaENDiZ0DcgtR69YxBX+oE D0oTSgi958WWrgm/p2eqE3CK4h0EqvUSx+tcnqxA= X-Received: by 2002:a17:906:4881:: with SMTP id v1mr1683067ejq.383.1618820252485; Mon, 19 Apr 2021 01:17:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJYZH0QZa+sRVeO2DjuzsgUYgTnfcyHw6NR/d953cZ/+ohVHYxVqiEhAjo9vStCBaYnVmhfw== X-Received: by 2002:a17:906:4881:: with SMTP id v1mr1683050ejq.383.1618820252362; Mon, 19 Apr 2021 01:17:32 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-192-147.adslplus.ch. [188.155.192.147]) by smtp.gmail.com with ESMTPSA id da13sm12384781edb.6.2021.04.19.01.17.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 01:17:32 -0700 (PDT) From: Krzysztof Kozlowski To: Support Opensource , Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Tony Lindgren , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 2/7] mfd: max8998: Simplify getting of_device_id match data Date: Mon, 19 Apr 2021 10:17:21 +0200 Message-Id: <20210419081726.67867-2-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> References: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Use of_device_get_match_data() to make the code slightly smaller. Signed-off-by: Krzysztof Kozlowski --- drivers/mfd/max8998.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/mfd/max8998.c b/drivers/mfd/max8998.c index 785f8e9841b7..42c60d4d97fb 100644 --- a/drivers/mfd/max8998.c +++ b/drivers/mfd/max8998.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -155,11 +156,8 @@ static struct max8998_platform_data *max8998_i2c_parse_dt_pdata( static inline unsigned long max8998_i2c_get_driver_data(struct i2c_client *i2c, const struct i2c_device_id *id) { - if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) { - const struct of_device_id *match; - match = of_match_node(max8998_dt_match, i2c->dev.of_node); - return (unsigned long)match->data; - } + if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) + return (unsigned long)of_device_get_match_data(&i2c->dev); return id->driver_data; } From patchwork Mon Apr 19 08:17:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12211071 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A00C4C43470 for ; Mon, 19 Apr 2021 08:17:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7CFE561104 for ; Mon, 19 Apr 2021 08:17:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235023AbhDSISG (ORCPT ); Mon, 19 Apr 2021 04:18:06 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50428 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233313AbhDSISE (ORCPT ); Mon, 19 Apr 2021 04:18:04 -0400 Received: from mail-ej1-f71.google.com ([209.85.218.71]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lYP65-0007ts-NF for linux-omap@vger.kernel.org; Mon, 19 Apr 2021 08:17:33 +0000 Received: by mail-ej1-f71.google.com with SMTP id 16-20020a1709063010b029037417ca2d43so3353106ejz.5 for ; Mon, 19 Apr 2021 01:17:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qBlSlGEgsRYkWadTEY1QTDX93GegaXkwf2V4Jg/WsDg=; b=osWP921UHGVnZhFcwXGir5pbbLThS/Qxf4mBRFgJsi5gb78MQ+/p1BBxLioFxeIPo3 DMmzM6pwGs9TCc3GeCfS4Lq0uM19is/uko+Oh6ZsP7PbWrsbqUS474E/5VBpAApfWJ+m gEnH/DtpOvyqXm47nHIg8fEZ3f1LMSFvZd8dqrCP1IfkUmONd1ENm1fp9omMJDPLH1wF hQ9YvpLbBc66gXIhkVrFCUHDXsTFPeSm6kFUb8WJVWTISWzEHeFyWD8rZ/N0tPeI3NgL rlBLFs2q1FLPixWOZMTXh9cpj9Q3Ls2wMr+7S3D1Wka0uxv9tVrT7eB6dRDebJ7ygf5Z LHmQ== X-Gm-Message-State: AOAM530GGm1TVr8e20PKcIm0H+TlC9XR7rlRi07CE0SwvlJZ5Jj7kzjA i/UzkVLi5lDa/fD//uvNKU5cCAQJxKfiX7fC7IxpubxKy7M9+3t5psjCqveuw4QQWYVLI4jgCqd cnelIenHMZwAZhy8WwRF8ueO7fZZt+YcNkTfUPcU= X-Received: by 2002:a17:906:5e15:: with SMTP id n21mr20554430eju.57.1618820253487; Mon, 19 Apr 2021 01:17:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzg+swdgj8EuewfKecTej+k1qH/AS1lZ95oqPWPHenRPBZ4PUCtQ7xGMn+3SRt0O+PhuF3UZw== X-Received: by 2002:a17:906:5e15:: with SMTP id n21mr20554419eju.57.1618820253361; Mon, 19 Apr 2021 01:17:33 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-192-147.adslplus.ch. [188.155.192.147]) by smtp.gmail.com with ESMTPSA id da13sm12384781edb.6.2021.04.19.01.17.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 01:17:33 -0700 (PDT) From: Krzysztof Kozlowski To: Support Opensource , Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Tony Lindgren , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 3/7] mfd: da9052: Simplify getting of_device_id match data Date: Mon, 19 Apr 2021 10:17:22 +0200 Message-Id: <20210419081726.67867-3-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> References: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Use of_device_get_match_data() to make the code slightly smaller. Signed-off-by: Krzysztof Kozlowski Acked-by: Adam Thomson --- drivers/mfd/da9052-i2c.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/mfd/da9052-i2c.c b/drivers/mfd/da9052-i2c.c index 47556d2d9abe..5d8ce8dca3fc 100644 --- a/drivers/mfd/da9052-i2c.c +++ b/drivers/mfd/da9052-i2c.c @@ -154,13 +154,8 @@ static int da9052_i2c_probe(struct i2c_client *client, return ret; #ifdef CONFIG_OF - if (!id) { - struct device_node *np = client->dev.of_node; - const struct of_device_id *deviceid; - - deviceid = of_match_node(dialog_dt_ids, np); - id = deviceid->data; - } + if (!id) + id = of_device_get_match_data(&client->dev); #endif if (!id) { From patchwork Mon Apr 19 08:17:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12211069 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC1DFC43600 for ; Mon, 19 Apr 2021 08:17:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C43BE6101C for ; Mon, 19 Apr 2021 08:17:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236260AbhDSISG (ORCPT ); Mon, 19 Apr 2021 04:18:06 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50437 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233520AbhDSISE (ORCPT ); Mon, 19 Apr 2021 04:18:04 -0400 Received: from mail-ed1-f70.google.com ([209.85.208.70]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lYP66-0007uU-OO for linux-omap@vger.kernel.org; Mon, 19 Apr 2021 08:17:34 +0000 Received: by mail-ed1-f70.google.com with SMTP id o4-20020a0564024384b0290378d45ecf57so10849715edc.12 for ; Mon, 19 Apr 2021 01:17:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rLN0PMvVAHq0LojAhsPhZSWrezfhIp/EDYrzGUmyMJA=; b=OEKbUslmUA00DZg9lIm6yejZ3u2Tf8TvNV7+yTiBEW2q13T6OFg+gWBK3v9ssrf9FK H5PVfRBnHTbZHoiBspce0HIGBguKEzE9BFJf0le02nGP98kRMPfhBqLRh9i5xZSdeedj ivA2Jz36XDUkowaRaqcjQtVP5JOs7piJmSNOSHwXJTBT4rG35xHqUYuWhaMBugR2q9Ea cDA4PCwJE+6iRWIUFtgCZZXxM6AcmHsPLBN5XAgqyUng2Qfj2RJr3KDIthEp+8LmImkS Ryb/G/HXvRGCXPTyBvEv9fIn/ksczsXpxRIYHluQyVx76ODiBfckXJERFAvdP0ypoihj j6tw== X-Gm-Message-State: AOAM533sg5XiCgU12gJ3JWpllMf3OOxK7MrQb6xiPeP1gj2XLuT66xHg DMcr+rsNcoPwhW6v5CFU2B4C7vQgfb3fTvPBfO36k5Xcj5G1VK46fgPc59TU+2WSKZ15OfMpByj q3j3CFtDiyiTbEb11c6DFnAJ0OjZrW4utgp2AZZU= X-Received: by 2002:aa7:d7d1:: with SMTP id e17mr24637987eds.84.1618820254499; Mon, 19 Apr 2021 01:17:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbgbYVj51767PEhDP7VAodeawbzJhcMg0iaGYdt1vBRijmX7LpaevyW3LVDSs2NNzeY/besg== X-Received: by 2002:aa7:d7d1:: with SMTP id e17mr24637973eds.84.1618820254403; Mon, 19 Apr 2021 01:17:34 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-192-147.adslplus.ch. [188.155.192.147]) by smtp.gmail.com with ESMTPSA id da13sm12384781edb.6.2021.04.19.01.17.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 01:17:34 -0700 (PDT) From: Krzysztof Kozlowski To: Support Opensource , Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Tony Lindgren , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 4/7] mfd: da9052: Simplify getting of_device_id match data Date: Mon, 19 Apr 2021 10:17:23 +0200 Message-Id: <20210419081726.67867-4-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> References: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Use of_device_get_match_data() to make the code slightly smaller. Signed-off-by: Krzysztof Kozlowski Acked-by: Adam Thomson --- drivers/mfd/da9062-core.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c index 8d913375152d..01f8e10dfa55 100644 --- a/drivers/mfd/da9062-core.c +++ b/drivers/mfd/da9062-core.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -622,7 +623,6 @@ static int da9062_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { struct da9062 *chip; - const struct of_device_id *match; unsigned int irq_base; const struct mfd_cell *cell; const struct regmap_irq_chip *irq_chip; @@ -635,15 +635,10 @@ static int da9062_i2c_probe(struct i2c_client *i2c, if (!chip) return -ENOMEM; - if (i2c->dev.of_node) { - match = of_match_node(da9062_dt_ids, i2c->dev.of_node); - if (!match) - return -EINVAL; - - chip->chip_type = (uintptr_t)match->data; - } else { + if (i2c->dev.of_node) + chip->chip_type = (uintptr_t)of_device_get_match_data(&i2c->dev); + else chip->chip_type = id->driver_data; - } i2c_set_clientdata(i2c, chip); chip->dev = &i2c->dev; From patchwork Mon Apr 19 08:17:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12211073 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 804C5C433B4 for ; Mon, 19 Apr 2021 08:17:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5E70261151 for ; Mon, 19 Apr 2021 08:17:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234501AbhDSISI (ORCPT ); Mon, 19 Apr 2021 04:18:08 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50444 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234863AbhDSISG (ORCPT ); Mon, 19 Apr 2021 04:18:06 -0400 Received: from mail-ej1-f69.google.com ([209.85.218.69]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lYP67-0007v2-Qb for linux-omap@vger.kernel.org; Mon, 19 Apr 2021 08:17:35 +0000 Received: by mail-ej1-f69.google.com with SMTP id g7-20020a1709065d07b029037c872d9cdcso3362537ejt.11 for ; Mon, 19 Apr 2021 01:17:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tc7UDOgzQIAykIaB+pmrJMasrN1QkIFHd3HQXapxUk8=; b=dfe4U5toQZo1JXSp+4Ye10y7YPQe7GTqFE9dc3lwYJ1oqLW2au5k2n+vp9ATiXQUH3 U1bGIkGr8emJIB5LgS4EybISdteVjETSCcIZmbsgOfUhDMXabunwH/VZXwNsIzTeH23E EEDvUsBNRl3rmUkGMRFAgHdzqAg2m9sfP9c5qWCofsWHYkYcRpTTpzfSJwKtB1yQTRjs 30EGpjJmr8YfHYOWFHeVspxbIu+24deGS6ntaUf4JR9dsY44o5msnTG8o3k64irzw8PR si4zspA0gGzdMpJjpFciHjNTO4XvbwSkNDnf5/Bj6Hlxpm5kDlcyjDDP8509nrVZQFoy 6KgQ== X-Gm-Message-State: AOAM531b0MsQCcKpuwDnC0Z1CCIauLRoxSzSqJkh7wBtAiTa6HTox7Ga 3SsznIngBYbgfQMjXXDWwa/VwLSFWkunfMsAmztHZ5RZusezMc3pB0FQWgTYotiTGc4ssQGVWm9 iJryFKkIGk/IjEhV9FNZAZAFs6ZMHvVBr5RQu8K4= X-Received: by 2002:a17:906:b355:: with SMTP id cd21mr20275783ejb.504.1618820255599; Mon, 19 Apr 2021 01:17:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuNTd9ZhGvDTg10FMK/NZMBEOBVAcdqe+s6V+fPsy8k7y7PvbXCS1lhxfXbnNILmmvl5bcsA== X-Received: by 2002:a17:906:b355:: with SMTP id cd21mr20275768ejb.504.1618820255421; Mon, 19 Apr 2021 01:17:35 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-192-147.adslplus.ch. [188.155.192.147]) by smtp.gmail.com with ESMTPSA id da13sm12384781edb.6.2021.04.19.01.17.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 01:17:35 -0700 (PDT) From: Krzysztof Kozlowski To: Support Opensource , Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Tony Lindgren , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 5/7] mfd: sec: Simplify getting of_device_id match data Date: Mon, 19 Apr 2021 10:17:24 +0200 Message-Id: <20210419081726.67867-5-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> References: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Use of_device_get_match_data() to make the code slightly smaller. Signed-off-by: Krzysztof Kozlowski --- drivers/mfd/sec-core.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 8d55992da19e..3126c39f3203 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -324,12 +325,8 @@ static inline unsigned long sec_i2c_get_driver_data(struct i2c_client *i2c, const struct i2c_device_id *id) { #ifdef CONFIG_OF - if (i2c->dev.of_node) { - const struct of_device_id *match; - - match = of_match_node(sec_dt_match, i2c->dev.of_node); - return (unsigned long)match->data; - } + if (i2c->dev.of_node) + return (unsigned long)of_device_get_match_data(&i2c->dev); #endif return id->driver_data; } From patchwork Mon Apr 19 08:17:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12211075 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1707FC43616 for ; Mon, 19 Apr 2021 08:17:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EBA656113C for ; Mon, 19 Apr 2021 08:17:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237367AbhDSISJ (ORCPT ); Mon, 19 Apr 2021 04:18:09 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50455 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233313AbhDSISH (ORCPT ); Mon, 19 Apr 2021 04:18:07 -0400 Received: from mail-ed1-f72.google.com ([209.85.208.72]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lYP68-0007vd-PY for linux-omap@vger.kernel.org; Mon, 19 Apr 2021 08:17:36 +0000 Received: by mail-ed1-f72.google.com with SMTP id r14-20020a50d68e0000b0290385504d6e4eso829117edi.7 for ; Mon, 19 Apr 2021 01:17:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UpAJNzbD9MKVQi14LfzEiS6XF3kyB2Fc0GZ6ydruDWw=; b=iro7JlF866guhfQ+S2YOdI5hLBEStUSC10ag5XbfynmPbPba9mV2Ks2akxh+IGFEi3 FIYGVRqC7KLJ9cgVHiaeao7zx/rUXpM0FAEydXUgpPP5MG3LZFwqafHhJBS4Qera6asT SGC46ZLz+S5kAmlsannVoxc6DjGp72DTAbyKQcKc6RxeuWann/QzamlR2kv54BEXpZLj 9LCtWTWuazgIIeFPzaDIlwmnC1niTbQptQCRgVfZUDVA+fnJw35qXBGLXr035POb88aT Nh+pDia3fmT4beTllDLP2ewpwRdIv/1T0YjYMX8auTmyzJ+u0hbvDkl99KkdrxYgSCjz 7o/g== X-Gm-Message-State: AOAM5302Yp8DlSnwP8vJ8MeDE4ky7q/rRvsl53P1SIG8+FjG+GKmHE6o bOGGrTmXnBccZgybWEwv2TWcYOJWTDsVRoDdnv1bRpWCG8EgWnOPtufQqZwYLSO1eMfnRHKEgJn 0IOrDXm+N5gXDNgeGN/WKc3rF7bzGN+iP7CQENF4= X-Received: by 2002:aa7:cd83:: with SMTP id x3mr23871125edv.373.1618820256546; Mon, 19 Apr 2021 01:17:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrRRvmlGCkxx4tXzhKQpNcCtZtp5i5u5JPY0gywyHuqwKmdgiNtXRNYyjndMc/zdrzzTv4fQ== X-Received: by 2002:aa7:cd83:: with SMTP id x3mr23871118edv.373.1618820256448; Mon, 19 Apr 2021 01:17:36 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-192-147.adslplus.ch. [188.155.192.147]) by smtp.gmail.com with ESMTPSA id da13sm12384781edb.6.2021.04.19.01.17.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 01:17:36 -0700 (PDT) From: Krzysztof Kozlowski To: Support Opensource , Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Tony Lindgren , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 6/7] mfd: wm831x: Correct kerneldoc Date: Mon, 19 Apr 2021 10:17:25 +0200 Message-Id: <20210419081726.67867-6-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> References: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Correct kerneldoc function name to fix W=1 warning: drivers/mfd/wm831x-core.c:121: warning: expecting prototype for wm831x_reg_unlock(). Prototype was for wm831x_reg_lock() instead Signed-off-by: Krzysztof Kozlowski Acked-by: Charles Keepax --- drivers/mfd/wm831x-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/wm831x-core.c b/drivers/mfd/wm831x-core.c index bcef08f58fb3..c31809b17547 100644 --- a/drivers/mfd/wm831x-core.c +++ b/drivers/mfd/wm831x-core.c @@ -109,7 +109,7 @@ static int wm831x_reg_locked(struct wm831x *wm831x, unsigned short reg) } /** - * wm831x_reg_unlock: Unlock user keyed registers + * wm831x_reg_lock: Unlock user keyed registers * * The WM831x has a user key preventing writes to particularly * critical registers. This function locks those registers, From patchwork Mon Apr 19 08:17:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12211077 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A98DC43470 for ; Mon, 19 Apr 2021 08:17:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 45C676113C for ; Mon, 19 Apr 2021 08:17:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238080AbhDSISM (ORCPT ); Mon, 19 Apr 2021 04:18:12 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50464 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236767AbhDSISI (ORCPT ); Mon, 19 Apr 2021 04:18:08 -0400 Received: from mail-ej1-f71.google.com ([209.85.218.71]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lYP69-0007wJ-To for linux-omap@vger.kernel.org; Mon, 19 Apr 2021 08:17:38 +0000 Received: by mail-ej1-f71.google.com with SMTP id ne22-20020a1709077b96b02903803a047edeso2039029ejc.3 for ; Mon, 19 Apr 2021 01:17:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xk3WBnA32t2m4Myce9cZ0YQ9ZIjnwr2MU+dccRhDaEQ=; b=fKg3wAU4TruFDN0H+f4PIohSlrddPUCsG8q+A6OrjQhNq1khml3gxjvfYwa4By60nz S3rvhUvhn52f9Vp0m7kHR9peRrUfY01dbYo9KYPuNz6TRiv+O1qDbh9vWmg5OxDyggyB 7VO78Tcf6ePFuLTbDeZA5kNI1Ac92GZyl3WgSqH1hIUQou/64B28yjE5EKfqDxnP2xuw Z86eSLrLiMIxMu7o7MMenbBdM+oAizg07CLXe5qRnIvQ88ZfJv16eqKZia9UErD0hkok OgAbbFmWfrknB24Tz5c4lGWua0rLG4vaxCMzkOnzIqN/sriX7ST8jMQW96f3gNQ/yoRs Xk+A== X-Gm-Message-State: AOAM532DtHV72CkABNq74LykV6neuRruwOnV25LFYpqEORAXl5gZ2AAz 0X4Q0QRlwYG9HKEj30xHNClzjQlvQIX0dnQKcziHoCItQ5Ri1IabIPHnMEzmi1urAkJV/8AWzRb aRTpPlXJQ9Kbm6W4mFtyOh4dY/iJXUXlPr62kBTw= X-Received: by 2002:aa7:c78a:: with SMTP id n10mr16235098eds.239.1618820257642; Mon, 19 Apr 2021 01:17:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEC1eWVQTu9LMVgr/ILKMxwUXo5jz/WdoxqL0Yi4g29Y+yv0xfxfv1+lWwr2RseWz0zqylAQ== X-Received: by 2002:aa7:c78a:: with SMTP id n10mr16235083eds.239.1618820257512; Mon, 19 Apr 2021 01:17:37 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-192-147.adslplus.ch. [188.155.192.147]) by smtp.gmail.com with ESMTPSA id da13sm12384781edb.6.2021.04.19.01.17.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Apr 2021 01:17:37 -0700 (PDT) From: Krzysztof Kozlowski To: Support Opensource , Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Tony Lindgren , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-omap@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 7/7] mfd: twl: Correct kerneldoc Date: Mon, 19 Apr 2021 10:17:26 +0200 Message-Id: <20210419081726.67867-7-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> References: <20210419081726.67867-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Correct kerneldoc function name to fix W=1 warning: drivers/mfd/twl-core.c:496: warning: expecting prototype for twl_regcache_bypass(). Prototype was for twl_set_regcache_bypass() instead Signed-off-by: Krzysztof Kozlowski --- drivers/mfd/twl-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index 20cf8cfe4f3b..24b77b18b725 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c @@ -485,8 +485,8 @@ int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes) EXPORT_SYMBOL(twl_i2c_read); /** - * twl_regcache_bypass - Configure the regcache bypass for the regmap associated - * with the module + * twl_set_regcache_bypass - Configure the regcache bypass for the regmap + * associated with the module * @mod_no: module number * @enable: Regcache bypass state *