From patchwork Tue Apr 20 17:01:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 425566 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,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 33FC6C43462 for ; Tue, 20 Apr 2021 17:01:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F090D613B2 for ; Tue, 20 Apr 2021 17:01:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233239AbhDTRCI (ORCPT ); Tue, 20 Apr 2021 13:02:08 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50070 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233199AbhDTRCF (ORCPT ); Tue, 20 Apr 2021 13:02:05 -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 1lYtki-0004Sn-8H for linux-samsung-soc@vger.kernel.org; Tue, 20 Apr 2021 17:01:32 +0000 Received: by mail-ej1-f69.google.com with SMTP id d11-20020a170906370bb029037c87968c04so5045026ejc.17 for ; Tue, 20 Apr 2021 10:01: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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=G40+ggJ5/BUsbwdccSqO8JqtdoxRrS30UvEQCJ2OFE4=; b=lmTbimoIp62WSev2c64Pr3nNSgBibOHb7MU64/Y5o2xEGuLPwSaWObs+WKkGRMLKFK eaQFEnLg8ag1JQ4xt8tf/AgHNhYsU6UF0m+dxmxZ/nU1QMqrh0uDeesTaJlbvruNs+Wu GIRYPYWh7AoboGykZhJMhPMj+RO8JrQgWbqeXdM/ROIP2KkPtmhO5Osh9rb8MyFylHqa qAvrrWpMTRfsQyQ101NQurpMWMsiZOJIamkKDPlwDaTTDgDpv8BUoOI3G0NZhMbi2cR3 jhCqRBZ/7WV2KzR+k8G5hjO0sHbbORrQvcpt7kIm69DR5d4aMeU/dUWHDZQhi8rkn21y FzQQ== X-Gm-Message-State: AOAM532aHWn+/1pzFFlLM8s8vGBHBY215aFjKmxvLqpgAxFfs4U8/9rx P8evexzcO1CClKXVd3VZxfus5L5UlVPtbh8cRC7T4tC9AfY6jzqo8yvbvaJgF8ketSAkgpGU6+e a+7lOVX5dlwDcN2VGJV5S1+ulhb8+DU7dUZMXz5gaeXxnjQ1E X-Received: by 2002:a17:906:7c4a:: with SMTP id g10mr29295870ejp.325.1618938091679; Tue, 20 Apr 2021 10:01:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5/RbdFmHFfQlMnizEq9tbD/ZtDoZ+o42mxE6WfppD7PT3wIgD8ZYXTuliN8iYgnsedYkV4Q== X-Received: by 2002:a17:906:7c4a:: with SMTP id g10mr29295835ejp.325.1618938091392; Tue, 20 Apr 2021 10:01:31 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-180-75.adslplus.ch. [188.155.180.75]) by smtp.gmail.com with ESMTPSA id x7sm16334441eds.67.2021.04.20.10.01.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Apr 2021 10:01:31 -0700 (PDT) From: Krzysztof Kozlowski To: Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Liam Girdwood , Mark Brown , Alessandro Zummo , Alexandre Belloni , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-rtc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki Subject: [PATCH 1/9] mfd: sec: Drop support for board files and require devicetree Date: Tue, 20 Apr 2021 19:01:10 +0200 Message-Id: <20210420170118.12788-2-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210420170118.12788-1-krzysztof.kozlowski@canonical.com> References: <20210420170118.12788-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The Samsung PMIC drivers since long time are used only on devicetree platforms (Samsung Exynos) and there are no users with board files. Drop the support for board files entirely and depend on OF for matching. Suggested-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski --- drivers/mfd/Kconfig | 1 + drivers/mfd/sec-core.c | 59 +++++++++++------------------------------- 2 files changed, 16 insertions(+), 44 deletions(-) diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index 5c7f2b100191..93a1610128c8 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -1133,6 +1133,7 @@ config MFD_RN5T618 config MFD_SEC_CORE tristate "Samsung Electronics PMIC Series Support" depends on I2C=y + depends on OF || COMPILE_TEST select MFD_CORE select REGMAP_I2C select REGMAP_IRQ diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 15dd4c579937..c61c1fc62165 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -94,7 +94,6 @@ static const struct mfd_cell s2mpu02_devs[] = { { .name = "s2mpu02-regulator", }, }; -#ifdef CONFIG_OF static const struct of_device_id sec_dt_match[] = { { .compatible = "samsung,s5m8767-pmic", @@ -122,7 +121,6 @@ static const struct of_device_id sec_dt_match[] = { }, }; MODULE_DEVICE_TABLE(of, sec_dt_match); -#endif static bool s2mpa01_volatile(struct device *dev, unsigned int reg) { @@ -282,7 +280,6 @@ static void sec_pmic_configure(struct sec_pmic_dev *sec_pmic) } } -#ifdef CONFIG_OF /* * Only the common platform data elements for s5m8767 are parsed here from the * device tree. Other sub-modules of s5m8767 such as pmic, rtc , charger and @@ -313,28 +310,12 @@ sec_pmic_i2c_parse_dt_pdata(struct device *dev) "samsung,s2mps11-wrstbi-ground"); return pd; } -#else -static struct sec_platform_data * -sec_pmic_i2c_parse_dt_pdata(struct device *dev) -{ - return NULL; -} -#endif - -static inline unsigned long sec_i2c_get_driver_data(struct i2c_client *i2c, - const struct i2c_device_id *id) -{ - if (i2c->dev.of_node) - return (unsigned long)of_device_get_match_data(&i2c->dev); - - return id->driver_data; -} static int sec_pmic_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { - struct sec_platform_data *pdata = dev_get_platdata(&i2c->dev); const struct regmap_config *regmap; + struct sec_platform_data *pdata; const struct mfd_cell *sec_devs; struct sec_pmic_dev *sec_pmic; unsigned long device_type; @@ -349,22 +330,19 @@ static int sec_pmic_probe(struct i2c_client *i2c, sec_pmic->dev = &i2c->dev; sec_pmic->i2c = i2c; sec_pmic->irq = i2c->irq; - device_type = sec_i2c_get_driver_data(i2c, id); - - if (sec_pmic->dev->of_node) { - pdata = sec_pmic_i2c_parse_dt_pdata(sec_pmic->dev); - if (IS_ERR(pdata)) { - ret = PTR_ERR(pdata); - return ret; - } - pdata->device_type = device_type; - } - if (pdata) { - sec_pmic->device_type = pdata->device_type; - sec_pmic->irq_base = pdata->irq_base; - sec_pmic->wakeup = pdata->wakeup; - sec_pmic->pdata = pdata; + device_type = (unsigned long)of_device_get_match_data(sec_pmic->dev); + + pdata = sec_pmic_i2c_parse_dt_pdata(sec_pmic->dev); + if (IS_ERR(pdata)) { + ret = PTR_ERR(pdata); + return ret; } + pdata->device_type = device_type; + + sec_pmic->device_type = pdata->device_type; + sec_pmic->irq_base = pdata->irq_base; + sec_pmic->wakeup = pdata->wakeup; + sec_pmic->pdata = pdata; switch (sec_pmic->device_type) { case S2MPA01: @@ -404,7 +382,7 @@ static int sec_pmic_probe(struct i2c_client *i2c, return ret; } - if (pdata && pdata->cfg_pmic_irq) + if (pdata->cfg_pmic_irq) pdata->cfg_pmic_irq(); sec_irq_init(sec_pmic); @@ -529,21 +507,14 @@ static int sec_pmic_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(sec_pmic_pm_ops, sec_pmic_suspend, sec_pmic_resume); -static const struct i2c_device_id sec_pmic_id[] = { - { "sec_pmic", 0 }, - { } -}; -MODULE_DEVICE_TABLE(i2c, sec_pmic_id); - static struct i2c_driver sec_pmic_driver = { .driver = { .name = "sec_pmic", .pm = &sec_pmic_pm_ops, - .of_match_table = of_match_ptr(sec_dt_match), + .of_match_table = sec_dt_match, }, .probe = sec_pmic_probe, .shutdown = sec_pmic_shutdown, - .id_table = sec_pmic_id, }; module_i2c_driver(sec_pmic_driver); From patchwork Tue Apr 20 17:01:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 424876 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,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 8DFC2C43470 for ; Tue, 20 Apr 2021 17:01:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 511E3613D1 for ; Tue, 20 Apr 2021 17:01:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232901AbhDTRCH (ORCPT ); Tue, 20 Apr 2021 13:02:07 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50078 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233239AbhDTRCF (ORCPT ); Tue, 20 Apr 2021 13:02:05 -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 1lYtkj-0004TT-9u for linux-samsung-soc@vger.kernel.org; Tue, 20 Apr 2021 17:01:33 +0000 Received: by mail-ed1-f72.google.com with SMTP id w15-20020a056402268fb02903828f878ec5so13466633edd.5 for ; Tue, 20 Apr 2021 10:01: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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cK2ReUjBLXXBh4lxBc6DTRo7cWOdEm7mAeUsBKVXSvQ=; b=sAso0+VYMrOpAPgqPQkbEbeUs8dtG8vnOuHmMPcyfqfCgmoYJnHr5u+9f0zuseQoka CbkJ8zcggUqOrR6JTyQc6VBa50JeEZKi0dV7qlC6upgOMsbNc4q2lDiPLOWLEGkCwkhE /StxsZ1/v+oyx9nFTKbZ0Os7EY3WGv9LwLEQyal02S4ugmzQ9d71dDhQThLHdBezNcwv TCU0iZGNh2rq65u2S0TPwbRVNBTA9fHzWVpitmB+oO/4FQRIdx3kE3s5LSAMZSggbLVb VeByxn6oXde/8lcdzLaCR3yV8ktIAvYUC0QyxN3kv5iTvnj40hMr2axuOsznPuYLWVVm TMtQ== X-Gm-Message-State: AOAM5337vVn6dW0dx7G5sbljUCyNZiduGhCw8JUGO+OgbkvZlmjRnLUP eD+AwBlPcfgpIHT94hHQhlM9CZXYSuhHEofvoDgdaOihir0PevvUIlekcaaoTZZIssZKx1bq2VJ iHndTxkPa3R8mgulwNYGf5xmtZJeYlsQSTMnEm3MtWTk95PRr X-Received: by 2002:a05:6402:1393:: with SMTP id b19mr33272130edv.333.1618938092888; Tue, 20 Apr 2021 10:01:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsfo95Qfe4xzN04pErckPsV4xUg8gCjdkg5/kz+p8rSAzf6rBygGzRUjfOHfAKmqHyncJAFA== X-Received: by 2002:a05:6402:1393:: with SMTP id b19mr33272118edv.333.1618938092757; Tue, 20 Apr 2021 10:01:32 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-180-75.adslplus.ch. [188.155.180.75]) by smtp.gmail.com with ESMTPSA id x7sm16334441eds.67.2021.04.20.10.01.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Apr 2021 10:01:32 -0700 (PDT) From: Krzysztof Kozlowski To: Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Liam Girdwood , Mark Brown , Alessandro Zummo , Alexandre Belloni , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-rtc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki Subject: [PATCH 2/9] mfd: sec: Remove unused cfg_pmic_irq in platform data Date: Tue, 20 Apr 2021 19:01:11 +0200 Message-Id: <20210420170118.12788-3-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210420170118.12788-1-krzysztof.kozlowski@canonical.com> References: <20210420170118.12788-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The 'cfg_pmic_irq' field of platform data structure is not used and can be safely dropped. Signed-off-by: Krzysztof Kozlowski --- drivers/mfd/sec-core.c | 3 --- include/linux/mfd/samsung/core.h | 1 - 2 files changed, 4 deletions(-) diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index c61c1fc62165..653d02b98d53 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -382,9 +382,6 @@ static int sec_pmic_probe(struct i2c_client *i2c, return ret; } - if (pdata->cfg_pmic_irq) - pdata->cfg_pmic_irq(); - sec_irq_init(sec_pmic); pm_runtime_set_active(sec_pmic->dev); diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index f1631a39acfc..68afc2b97a41 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h @@ -85,7 +85,6 @@ struct sec_platform_data { int num_regulators; int irq_base; - int (*cfg_pmic_irq)(void); bool wakeup; bool buck_voltage_lock; From patchwork Tue Apr 20 17:01:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 424875 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, 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 D02A5C433B4 for ; Tue, 20 Apr 2021 17:01:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9AE436135F for ; Tue, 20 Apr 2021 17:01:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233199AbhDTRCI (ORCPT ); Tue, 20 Apr 2021 13:02:08 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50096 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233247AbhDTRCH (ORCPT ); Tue, 20 Apr 2021 13:02:07 -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 1lYtkk-0004UO-Nt for linux-samsung-soc@vger.kernel.org; Tue, 20 Apr 2021 17:01:34 +0000 Received: by mail-ej1-f69.google.com with SMTP id o25-20020a1709061d59b029037c94676df5so5047015ejh.7 for ; Tue, 20 Apr 2021 10:01: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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3HCzipZq3msLcuy2WkjGbMNJtslSk5WuayCRwwGv1I8=; b=kOoCbyMdcRRuKOdHpHk+UrZ7L2+8szP8Sfz+VdUfG1jTM9A8UNXS6wTo0AwaAbMAS+ trAkvCk1W8jAnVoo7DjUtPPBO917768DY3F0QVHDBU2Owo4ugIEVBMbwPozvOb7yBuEr ddVtHeKTx4uF3rH66OYWjkI+66IuTPP4uv3VfPzm4cD+S50fxUH0sxGB5xXWSB2+FYRY jGHMpYf/2pFoPS37l9YAL/1RbYt1OydooasvhKzWe9SG4t461vZ/nu0QXN3+V2xdMTGV num8iXS0Znd0dqVO+kFQEjeUZ21cU/vLfsKnrd5v1BjSX8rFtqL5gb9FUM28EFrpQR2P Pirg== X-Gm-Message-State: AOAM533tTd0FlciyDHN8j/kVa17m9lEtvjUXaQuiWFjSa+WcGwXl7Mdz uV1YpkptRqGrwK+PbXi2XdQOk8QL7xMv+K+gJdYCM7EMBQnq5hFUMgbEbnaRMdzX4FxggEzVCw3 ZhROcUYKrDJtXqNfiWkRKnUWDGku3FFElMC7mya21QqbDqE7z X-Received: by 2002:a05:6402:485:: with SMTP id k5mr33466131edv.211.1618938094310; Tue, 20 Apr 2021 10:01:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxELCUSPyZrAOwt3tM3D+dUCVIuCF50hufvL6zlHUtYRnZrR2c+i038ZRqkVsJ8Am5+aEE28g== X-Received: by 2002:a05:6402:485:: with SMTP id k5mr33466108edv.211.1618938094155; Tue, 20 Apr 2021 10:01:34 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-180-75.adslplus.ch. [188.155.180.75]) by smtp.gmail.com with ESMTPSA id x7sm16334441eds.67.2021.04.20.10.01.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Apr 2021 10:01:33 -0700 (PDT) From: Krzysztof Kozlowski To: Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Liam Girdwood , Mark Brown , Alessandro Zummo , Alexandre Belloni , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-rtc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki Subject: [PATCH 3/9] mfd: sec: Remove unused device_type in platform data Date: Tue, 20 Apr 2021 19:01:12 +0200 Message-Id: <20210420170118.12788-4-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210420170118.12788-1-krzysztof.kozlowski@canonical.com> References: <20210420170118.12788-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The 'device_type' field of platform data structure is not used and can be safely dropped. Signed-off-by: Krzysztof Kozlowski --- drivers/mfd/sec-core.c | 5 +---- include/linux/mfd/samsung/core.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 653d02b98d53..4c4db3171ce6 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -318,7 +318,6 @@ static int sec_pmic_probe(struct i2c_client *i2c, struct sec_platform_data *pdata; const struct mfd_cell *sec_devs; struct sec_pmic_dev *sec_pmic; - unsigned long device_type; int ret, num_sec_devs; sec_pmic = devm_kzalloc(&i2c->dev, sizeof(struct sec_pmic_dev), @@ -330,16 +329,14 @@ static int sec_pmic_probe(struct i2c_client *i2c, sec_pmic->dev = &i2c->dev; sec_pmic->i2c = i2c; sec_pmic->irq = i2c->irq; - device_type = (unsigned long)of_device_get_match_data(sec_pmic->dev); pdata = sec_pmic_i2c_parse_dt_pdata(sec_pmic->dev); if (IS_ERR(pdata)) { ret = PTR_ERR(pdata); return ret; } - pdata->device_type = device_type; - sec_pmic->device_type = pdata->device_type; + sec_pmic->device_type = (unsigned long)of_device_get_match_data(sec_pmic->dev); sec_pmic->irq_base = pdata->irq_base; sec_pmic->wakeup = pdata->wakeup; sec_pmic->pdata = pdata; diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index 68afc2b97a41..bfde1b7c6303 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h @@ -81,7 +81,6 @@ int sec_irq_resume(struct sec_pmic_dev *sec_pmic); struct sec_platform_data { struct sec_regulator_data *regulators; struct sec_opmode_data *opmode; - int device_type; int num_regulators; int irq_base; From patchwork Tue Apr 20 17:01:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 425565 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, 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 F22ADC43462 for ; Tue, 20 Apr 2021 17:01:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B70DD613AE for ; Tue, 20 Apr 2021 17:01:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233287AbhDTRCM (ORCPT ); Tue, 20 Apr 2021 13:02:12 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50109 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233282AbhDTRCL (ORCPT ); Tue, 20 Apr 2021 13:02:11 -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 1lYtko-0004Vr-Ku for linux-samsung-soc@vger.kernel.org; Tue, 20 Apr 2021 17:01:38 +0000 Received: by mail-ed1-f70.google.com with SMTP id z3-20020a05640240c3b029037fb0c2bd3bso13574741edb.23 for ; Tue, 20 Apr 2021 10:01:38 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u4MQZJQCSFcmUXULRJb5AryMwyvkkTE7eS672AhRJWI=; b=o/IJkL7OCF3VknTYgUyyOa4GKAXWRBeHLV1qnyfXB6Ed5P3eXkw/If8LrKUSugDEnF xJ7UrrIBZRIZv/T9OEt0hBIOKTN6rwjWuyf1Yt0mbUU7arYWZqQqgA5Y21DD3Y5Effom hUm5jf/+wxf69N+bJ7b5Pocf5hooiWsqIF60uRWT21KJZV1I9/O80T2TbUDJ9UQNOYYg msWKXeDbjlpKfBMR06QbCDND8HhzB+sCytCM8p3qmgfyLH/Tr0kD6llUcq58fGLFZgvD q7HKB6lCQo+ld/XXSqwbk4uZGxxdaUa4gQVb/HOYEXQPFfFwlTDXjZ/+cplWobUEx0Ho WO7Q== X-Gm-Message-State: AOAM530rGV0/ONhvAt0HDYja6HchseSBe3VcW8VG1x7RjOZJvZV63vAb v77Vd61XLcW5egdg3TYlzGDdsKZ4NStgzTWx5GdX9Xd3u1UDQgRx2QVgfMs4gumNkYpLE93pEhG dUhf6sMMa2adXt86cJXrZsVD/szhK4gY2/htHluuotQULDqX0 X-Received: by 2002:a17:906:a10e:: with SMTP id t14mr28175402ejy.103.1618938096020; Tue, 20 Apr 2021 10:01:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5VBAesIurvAN/mJmidYWOkS3cFDUzXX2qoPNrx8KEYx6J8WUPmFjGJfIG6RsmohoUpNTSUw== X-Received: by 2002:a17:906:a10e:: with SMTP id t14mr28175378ejy.103.1618938095878; Tue, 20 Apr 2021 10:01:35 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-180-75.adslplus.ch. [188.155.180.75]) by smtp.gmail.com with ESMTPSA id x7sm16334441eds.67.2021.04.20.10.01.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Apr 2021 10:01:35 -0700 (PDT) From: Krzysztof Kozlowski To: Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Liam Girdwood , Mark Brown , Alessandro Zummo , Alexandre Belloni , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-rtc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki Subject: [PATCH 4/9] mfd: sec: Remove unused irq_base in platform data Date: Tue, 20 Apr 2021 19:01:13 +0200 Message-Id: <20210420170118.12788-5-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210420170118.12788-1-krzysztof.kozlowski@canonical.com> References: <20210420170118.12788-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The 'irq_base' field of platform data structure is not assigned, therefore its default value of 0 has no impact and can be safely dropped. Signed-off-by: Krzysztof Kozlowski --- drivers/mfd/sec-core.c | 1 - drivers/mfd/sec-irq.c | 4 +--- include/linux/mfd/samsung/core.h | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 4c4db3171ce6..a9d4fbc51997 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -337,7 +337,6 @@ static int sec_pmic_probe(struct i2c_client *i2c, } sec_pmic->device_type = (unsigned long)of_device_get_match_data(sec_pmic->dev); - sec_pmic->irq_base = pdata->irq_base; sec_pmic->wakeup = pdata->wakeup; sec_pmic->pdata = pdata; diff --git a/drivers/mfd/sec-irq.c b/drivers/mfd/sec-irq.c index a98c5d165039..e473c2fb42d5 100644 --- a/drivers/mfd/sec-irq.c +++ b/drivers/mfd/sec-irq.c @@ -444,7 +444,6 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic) if (!sec_pmic->irq) { dev_warn(sec_pmic->dev, "No interrupt specified, no interrupts\n"); - sec_pmic->irq_base = 0; return 0; } @@ -482,8 +481,7 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic) ret = devm_regmap_add_irq_chip(sec_pmic->dev, sec_pmic->regmap_pmic, sec_pmic->irq, IRQF_TRIGGER_FALLING | IRQF_ONESHOT, - sec_pmic->irq_base, sec_irq_chip, - &sec_pmic->irq_data); + 0, sec_irq_chip, &sec_pmic->irq_data); if (ret != 0) { dev_err(sec_pmic->dev, "Failed to register IRQ chip: %d\n", ret); return ret; diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index bfde1b7c6303..9864f13b7814 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h @@ -67,7 +67,6 @@ struct sec_pmic_dev { struct i2c_client *i2c; unsigned long device_type; - int irq_base; int irq; struct regmap_irq_chip_data *irq_data; @@ -83,8 +82,6 @@ struct sec_platform_data { struct sec_opmode_data *opmode; int num_regulators; - int irq_base; - bool wakeup; bool buck_voltage_lock; From patchwork Tue Apr 20 17:02:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 424874 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, 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 A84D4C433ED for ; Tue, 20 Apr 2021 17:02:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 613FD6100A for ; Tue, 20 Apr 2021 17:02:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233267AbhDTRDV (ORCPT ); Tue, 20 Apr 2021 13:03:21 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50122 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233086AbhDTRDU (ORCPT ); Tue, 20 Apr 2021 13:03:20 -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 1lYtlv-0004ag-LZ for linux-samsung-soc@vger.kernel.org; Tue, 20 Apr 2021 17:02:47 +0000 Received: by mail-ed1-f71.google.com with SMTP id bf25-20020a0564021a59b0290385169cebf8so6081864edb.8 for ; Tue, 20 Apr 2021 10:02:47 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=keyZF1dMrTytgJE0QXrv29sXyKKIfNCJoe54NneFfoA=; b=oOaz90NudKHyHgFxSrfIa8PouUqZHSyJPvtIpywH4MdydnYi9qUWHEC6/wV/8PtEnY suvAXAsAY7kEZIxQ23flrftISPfLQBQB2bXZpj/PBA8f2nOA8n0ZgBFZasYk3pLyFQTT UsRyyNE105Rky3AYOYoQHLynla1NopZn0+VdgHmctk5qL4GxiG2QViPdwUMvQ+Zzei+G ZI1YounT1UQvseQqjc64k880+4d4+csjt2e1acrN1v2BCT/1EQpgU3qtmao+bglLaUSV /75OBLKoCDP9qq1hh/M3Rc9GNoKpw9urgtQOVvK9oSx5wP0RNvE0Dqj31Pi+nQlWgIa0 6m7w== X-Gm-Message-State: AOAM531idjO6Rf7nKjANtRzYL6tYcwDlPXN2fu4DuGwgg3V4KT3Ugudp 9/9wyxrrdHpXJPvMMZI8dT/sYli+tMDVHqLKJ/Tls/OYlh6PU8TBZ6XsJMaKUJp4wETlO+v7usG S3ZUsdybJ0Gz1cIUbe/7UFBuVpLkNRjlN7P/XdX/k33CkhRXs X-Received: by 2002:a17:906:8293:: with SMTP id h19mr28510700ejx.217.1618938167392; Tue, 20 Apr 2021 10:02:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZQNmrSU3oUKEeIgav74Ok6jYa6Nq7lnseZVdJOdyMAiCgNg4cKijG2O8AVSf2mLoof7/yXQ== X-Received: by 2002:a17:906:8293:: with SMTP id h19mr28510678ejx.217.1618938167258; Tue, 20 Apr 2021 10:02:47 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-180-75.adslplus.ch. [188.155.180.75]) by smtp.gmail.com with ESMTPSA id s20sm16590714edu.93.2021.04.20.10.02.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Apr 2021 10:02:46 -0700 (PDT) From: Krzysztof Kozlowski To: Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Liam Girdwood , Mark Brown , Alessandro Zummo , Alexandre Belloni , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-rtc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki Subject: [PATCH 5/9] mfd: sec: Enable wakeup from suspend via devicetree property Date: Tue, 20 Apr 2021 19:02:40 +0200 Message-Id: <20210420170244.13467-1-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210420170118.12788-1-krzysztof.kozlowski@canonical.com> References: <20210420170118.12788-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Set device wakeup capability from devicetree property (done by drivers core), instead of always setting it to 0 (because value in platform data is not assigned). This should not have visible effect on actual resuming from suspend because the child device - S5M RTC driver - is responsible for waking up and sets device wakeup unconditionally. Signed-off-by: Krzysztof Kozlowski --- drivers/mfd/sec-core.c | 8 -------- include/linux/mfd/samsung/core.h | 3 --- 2 files changed, 11 deletions(-) diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index a9d4fbc51997..1fb29c45f5cf 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -298,12 +298,6 @@ sec_pmic_i2c_parse_dt_pdata(struct device *dev) if (!pd) return ERR_PTR(-ENOMEM); - /* - * ToDo: the 'wakeup' member in the platform data is more of a linux - * specfic information. Hence, there is no binding for that yet and - * not parsed here. - */ - pd->manual_poweroff = of_property_read_bool(dev->of_node, "samsung,s2mps11-acokb-ground"); pd->disable_wrstbi = of_property_read_bool(dev->of_node, @@ -337,7 +331,6 @@ static int sec_pmic_probe(struct i2c_client *i2c, } sec_pmic->device_type = (unsigned long)of_device_get_match_data(sec_pmic->dev); - sec_pmic->wakeup = pdata->wakeup; sec_pmic->pdata = pdata; switch (sec_pmic->device_type) { @@ -429,7 +422,6 @@ static int sec_pmic_probe(struct i2c_client *i2c, if (ret) return ret; - device_init_wakeup(sec_pmic->dev, sec_pmic->wakeup); sec_pmic_configure(sec_pmic); sec_pmic_dump_rev(sec_pmic); diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index 9864f13b7814..b0d049a56d16 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h @@ -69,8 +69,6 @@ struct sec_pmic_dev { unsigned long device_type; int irq; struct regmap_irq_chip_data *irq_data; - - bool wakeup; }; int sec_irq_init(struct sec_pmic_dev *sec_pmic); @@ -82,7 +80,6 @@ struct sec_platform_data { struct sec_opmode_data *opmode; int num_regulators; - bool wakeup; bool buck_voltage_lock; int buck_gpios[3]; From patchwork Tue Apr 20 17:02:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 425564 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=-13.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNWANTED_LANGUAGE_BODY, 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 D07A7C43461 for ; Tue, 20 Apr 2021 17:02:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8EE37613AF for ; Tue, 20 Apr 2021 17:02:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233356AbhDTRDV (ORCPT ); Tue, 20 Apr 2021 13:03:21 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50134 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233234AbhDTRDV (ORCPT ); Tue, 20 Apr 2021 13:03:21 -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 1lYtlx-0004be-2i for linux-samsung-soc@vger.kernel.org; Tue, 20 Apr 2021 17:02:49 +0000 Received: by mail-ed1-f70.google.com with SMTP id m18-20020a0564025112b0290378d2a266ebso13458179edd.15 for ; Tue, 20 Apr 2021 10:02:49 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Rjka4Njemna1OOKJdcZeeFwVYEY/9hgKuOFFKuvjSYE=; b=EMLZfUJ5ChzDSP5tHC4eoMWeVAl0HqIaI2ZmhZZgpabXrjirWRhMevUCw0zuzpbLuB 1gSQ5OiVISsubo9c8DUdTR4drO04TMpOhT2VUtzkxcZUCPB8510lDVmk9nTFzyXq8hNj inm9vvslnF8p12A+uHR+i0atQfl4AwokvgOShcMtTRSIrSNY5vmMcjemnG6ALYoAofpH 9rsaoIW9JtyMUBIqdXtEqhDbN66hkEgylU8BiD3P5Sy3fWn/+4iQ5taizeocKhOAl1ea kIYi9KlVDnxPR/QNu/dUqRLzlQL7l9Tc/RZNSQv346Krzqx/h+YnjgdtL/slhpGue0V0 8wrg== X-Gm-Message-State: AOAM530ixPRM85u6tKYTYbU8UeG301TQc3s7Ag/MicTvgxusmYb5UJnD 6epw/HBuhXErpwnXFCb5Qcp3H0CYm3wGqiRzChZmftdOu6cREdP7p3zuGdK5oyd8pLORC4ODkrS QeFCGEzqbOsHzjgMqmfSKxTepEE5dDG/qx8DirXogZCyV3KWd X-Received: by 2002:a17:907:33cb:: with SMTP id zk11mr29272725ejb.231.1618938168643; Tue, 20 Apr 2021 10:02:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEptLquhZ2/QqZ4X/5o6u/BOlY7S9w9blCK0zCE6EhdECvGDYJS8VhGVzjFSaiOFlOBW2WUw== X-Received: by 2002:a17:907:33cb:: with SMTP id zk11mr29272709ejb.231.1618938168470; Tue, 20 Apr 2021 10:02:48 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-180-75.adslplus.ch. [188.155.180.75]) by smtp.gmail.com with ESMTPSA id s20sm16590714edu.93.2021.04.20.10.02.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Apr 2021 10:02:48 -0700 (PDT) From: Krzysztof Kozlowski To: Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Liam Girdwood , Mark Brown , Alessandro Zummo , Alexandre Belloni , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-rtc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki Subject: [PATCH 6/9] mfd: sec: Remove unused platform data members Date: Tue, 20 Apr 2021 19:02:41 +0200 Message-Id: <20210420170244.13467-2-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210420170244.13467-1-krzysztof.kozlowski@canonical.com> References: <20210420170118.12788-1-krzysztof.kozlowski@canonical.com> <20210420170244.13467-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The Samsung PMIC drivers for early chipsets like S5M8767 stored quite a lot in platform data (struct sec_platform_data). The s5m8767 regulator driver currently references only some of its fields. Newer regulator drivers (e.g. s2mps11) use even less platform data fields. Clean up the structure to reduce memory footprint and source code size. Signed-off-by: Krzysztof Kozlowski --- include/linux/mfd/samsung/core.h | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h index b0d049a56d16..f92fe090473d 100644 --- a/include/linux/mfd/samsung/core.h +++ b/include/linux/mfd/samsung/core.h @@ -80,8 +80,6 @@ struct sec_platform_data { struct sec_opmode_data *opmode; int num_regulators; - bool buck_voltage_lock; - int buck_gpios[3]; int buck_ds[3]; unsigned int buck2_voltage[8]; @@ -91,35 +89,12 @@ struct sec_platform_data { unsigned int buck4_voltage[8]; bool buck4_gpiodvs; - int buck_set1; - int buck_set2; - int buck_set3; - int buck2_enable; - int buck3_enable; - int buck4_enable; int buck_default_idx; - int buck2_default_idx; - int buck3_default_idx; - int buck4_default_idx; - int buck_ramp_delay; - int buck2_ramp_delay; - int buck34_ramp_delay; - int buck5_ramp_delay; - int buck16_ramp_delay; - int buck7810_ramp_delay; - int buck9_ramp_delay; - int buck24_ramp_delay; - int buck3_ramp_delay; - int buck7_ramp_delay; - int buck8910_ramp_delay; - - bool buck1_ramp_enable; bool buck2_ramp_enable; bool buck3_ramp_enable; bool buck4_ramp_enable; - bool buck6_ramp_enable; int buck2_init; int buck3_init; From patchwork Tue Apr 20 17:02:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 424873 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, 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 60240C433B4 for ; Tue, 20 Apr 2021 17:02:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 294A0613C9 for ; Tue, 20 Apr 2021 17:02:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233285AbhDTRDY (ORCPT ); Tue, 20 Apr 2021 13:03:24 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50144 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233363AbhDTRDX (ORCPT ); Tue, 20 Apr 2021 13:03:23 -0400 Received: from mail-ej1-f70.google.com ([209.85.218.70]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lYtly-0004cQ-Ou for linux-samsung-soc@vger.kernel.org; Tue, 20 Apr 2021 17:02:50 +0000 Received: by mail-ej1-f70.google.com with SMTP id c18-20020a17090603d2b029037c77ad778eso5026432eja.1 for ; Tue, 20 Apr 2021 10:02:50 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CZHnNFNaMNa8a85SBpXammff3rvFDkP+H98gsBQ8d3o=; b=bTKPqrPTne0D9maIs6GNY+3WyBLsQA4gbeLZZBbwvIxf9PWdSF0qk6bC0vNlVgobh1 DVZadiMWZo6KU8AjWTMEpriZ1HK5PRLEMeZbpNP0KADhf0x9SfS0zOYSGZv2EVetgLxd KNiDEmPtc3oG/bitNrOTizSWJ/Nuw7BBO5qJAfBy2jMHUvIGesHx2SZW4PrfIQg4/efH jCzjAdgQGW+aAMVd+qFvu+oo888p7b/+AjBDFY8a3HWSX145fF711o3VRrY1jcCnaM9/ 38gUzOV28WHhWlruEMk4kibW6LY5Krsy21nmzhYcuPJeb4PKAeR07dcLFPzzt5a+OirZ vnBg== X-Gm-Message-State: AOAM533Dhhh6L4jXggio2zJOGNuSBcTnu475uNFUCSwKZFHU4IBnh+UF phubpJSWKD713qy6dLeIpjaBh30y2jHPhwF0U2dInplTbt5bNHuya/Mv9HvBiABOtobEdNijjLU JWy73SR/s75II3w8sWxkRnqLiU33mM1ehoXlRrVHMwvWa0NIa X-Received: by 2002:a17:906:4913:: with SMTP id b19mr28867179ejq.439.1618938170533; Tue, 20 Apr 2021 10:02:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOLsxZKglCAv77mKXcTh7j9A7OdejF9kWYftWrwmpV/d4re5KZPtRxzK5D7Kz9pjhQCLFxOg== X-Received: by 2002:a17:906:4913:: with SMTP id b19mr28867163ejq.439.1618938170410; Tue, 20 Apr 2021 10:02:50 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-180-75.adslplus.ch. [188.155.180.75]) by smtp.gmail.com with ESMTPSA id s20sm16590714edu.93.2021.04.20.10.02.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Apr 2021 10:02:49 -0700 (PDT) From: Krzysztof Kozlowski To: Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Liam Girdwood , Mark Brown , Alessandro Zummo , Alexandre Belloni , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-rtc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki Subject: [PATCH 7/9] rtc: s5m: Remove reference to parent's device pdata Date: Tue, 20 Apr 2021 19:02:42 +0200 Message-Id: <20210420170244.13467-3-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210420170244.13467-1-krzysztof.kozlowski@canonical.com> References: <20210420170118.12788-1-krzysztof.kozlowski@canonical.com> <20210420170244.13467-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The S5M RTC driver does not use parent's device (sec-core PMIC driver) platform data so there is no need to check for it. Signed-off-by: Krzysztof Kozlowski --- drivers/rtc/rtc-s5m.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/rtc/rtc-s5m.c b/drivers/rtc/rtc-s5m.c index 80b66f16db89..038269a6b08c 100644 --- a/drivers/rtc/rtc-s5m.c +++ b/drivers/rtc/rtc-s5m.c @@ -713,16 +713,10 @@ static int s5m8767_rtc_init_reg(struct s5m_rtc_info *info) static int s5m_rtc_probe(struct platform_device *pdev) { struct sec_pmic_dev *s5m87xx = dev_get_drvdata(pdev->dev.parent); - struct sec_platform_data *pdata = s5m87xx->pdata; struct s5m_rtc_info *info; const struct regmap_config *regmap_cfg; int ret, alarm_irq; - if (!pdata) { - dev_err(pdev->dev.parent, "Platform data not supplied\n"); - return -ENODEV; - } - info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); if (!info) return -ENOMEM; From patchwork Tue Apr 20 17:02:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 425563 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, 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 8BEC9C43461 for ; Tue, 20 Apr 2021 17:02:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 54199613D1 for ; Tue, 20 Apr 2021 17:02:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233401AbhDTRD0 (ORCPT ); Tue, 20 Apr 2021 13:03:26 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50167 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233365AbhDTRDZ (ORCPT ); Tue, 20 Apr 2021 13:03:25 -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 1lYtm1-0004dY-0X for linux-samsung-soc@vger.kernel.org; Tue, 20 Apr 2021 17:02:53 +0000 Received: by mail-ed1-f72.google.com with SMTP id i18-20020aa7c7120000b02903853032ef71so4541096edq.22 for ; Tue, 20 Apr 2021 10:02:53 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uHDtfujd3OPxNtMM86LnHidWuIbqjKYUJi1OA9n+rmQ=; b=IbOEvU4r/Q/Qvap2w/9YCi86KaHZzkEcEpoc3XefyPEMzyIcWUaSyKjmsertLT2C8L ulGrEjX8DzeR3m6LOYRWwp/mGQXHHrATIXgPp+X1ttqc/LCswtP8/wisDCBbsK3qfKG+ dCySjlLXEQqkP5COcVfXUQpuFxDBZQvq25JLM/GvpzYmKNItuLMc3RstAgIxpQZzhVVj FQ/mQI5IpOaA2BWkCPJDwh8jGtbxhhQnSlHvvqdUOEIlSsqNfWRvAQTe6OBnN9FExvJu z4BPS3gTFpLbrYRV2XbGLrL3Bi2zt/qBhNO00O70vbU1zZKTSCMqbNCR13QUaDYMwvTo Hs7Q== X-Gm-Message-State: AOAM532cRZ1ss+bkFTW97v3Ew9NQYL3vIo4z+YDwnbhlkjqtfpokqDDW zWWbZQo/6RhuzGztzqhn7jtW1ARCi5KnijfLW9HEneSlIbL9siV8TXVWqsGX77enyyi3LwNtVtJ ezW2pyU8uWuEfM/sWOkyHZIWBRu4CdwhuTi7nI4gb0hdgPu5s X-Received: by 2002:a05:6402:26ca:: with SMTP id x10mr19010619edd.386.1618938172775; Tue, 20 Apr 2021 10:02:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/sePBPRPQUTmx8fDkJ2+CsjWnEpj49FgojrQhVJZqntZu2qHLjMn0Vt3q4U7LC4bOpSKRAQ== X-Received: by 2002:a05:6402:26ca:: with SMTP id x10mr19010591edd.386.1618938172615; Tue, 20 Apr 2021 10:02:52 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-180-75.adslplus.ch. [188.155.180.75]) by smtp.gmail.com with ESMTPSA id s20sm16590714edu.93.2021.04.20.10.02.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Apr 2021 10:02:52 -0700 (PDT) From: Krzysztof Kozlowski To: Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Liam Girdwood , Mark Brown , Alessandro Zummo , Alexandre Belloni , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-rtc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki Subject: [PATCH 8/9] regulator: s2mpa01: Drop initialization via platform data Date: Tue, 20 Apr 2021 19:02:43 +0200 Message-Id: <20210420170244.13467-4-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210420170244.13467-1-krzysztof.kozlowski@canonical.com> References: <20210420170118.12788-1-krzysztof.kozlowski@canonical.com> <20210420170244.13467-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org None of the platforms with S2MPA01 use board files, so any initialization via platform data can be safely removed. Signed-off-by: Krzysztof Kozlowski --- drivers/regulator/s2mpa01.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/regulator/s2mpa01.c b/drivers/regulator/s2mpa01.c index 115f59530852..28b424fe7bea 100644 --- a/drivers/regulator/s2mpa01.c +++ b/drivers/regulator/s2mpa01.c @@ -340,7 +340,6 @@ static const struct regulator_desc regulators[] = { static int s2mpa01_pmic_probe(struct platform_device *pdev) { struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); - struct sec_platform_data *pdata = dev_get_platdata(iodev->dev); struct regulator_config config = { }; struct s2mpa01_info *s2mpa01; int i; @@ -356,9 +355,6 @@ static int s2mpa01_pmic_probe(struct platform_device *pdev) for (i = 0; i < S2MPA01_REGULATOR_MAX; i++) { struct regulator_dev *rdev; - if (pdata) - config.init_data = pdata->regulators[i].initdata; - rdev = devm_regulator_register(&pdev->dev, ®ulators[i], &config); if (IS_ERR(rdev)) { From patchwork Tue Apr 20 17:02:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 424872 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, 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 D8489C43462 for ; Tue, 20 Apr 2021 17:02:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A69426135F for ; Tue, 20 Apr 2021 17:02:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233413AbhDTRD1 (ORCPT ); Tue, 20 Apr 2021 13:03:27 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50173 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233365AbhDTRD1 (ORCPT ); Tue, 20 Apr 2021 13:03:27 -0400 Received: from mail-ed1-f69.google.com ([209.85.208.69]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lYtm2-0004eQ-Ac for linux-samsung-soc@vger.kernel.org; Tue, 20 Apr 2021 17:02:54 +0000 Received: by mail-ed1-f69.google.com with SMTP id bf25-20020a0564021a59b0290385169cebf8so6082024edb.8 for ; Tue, 20 Apr 2021 10:02:54 -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:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NmkwtcSUIB+GcQFfaJ8p9bZLIwyyfL6wMEQEOKgutFA=; b=WMfr/oqX/SdeYQG9OZ+oLZW/YMKc958RsZxU/TypJV08mkfyj5UL4AEG2qj/fx+VyC tem8/Wy7EPq2HQwkRnplfK2aCt5clmzEZMS+T8pHNaIqzFeQ/WpOVXf9wO36x3UmuJ3P iTFuk1oZoFtXWsS00gWP8j4p5FHLjJocEgqsOR+k8wiAh4T5zrbEfIYTMOx1BfjEgp81 7Uxo8+Me9TkthBYwLqzYX7uApBFWIgNXG5uT9bksOq3oFFg/03RuJb7+2SzkVkiiIZSn nMOLsFazWwCvWZuhoI61FdLquHHxm9qOnUmOP3SQIJGCPOtPpRUAW5aWjMZDCRJbhWfF WMRg== X-Gm-Message-State: AOAM531whqStSYZQV/JRfl8ecP1ESNTEjIvVylqzcuQDcgc7Cz8Y6ORa l/LVTGL7zrSW+EUNBUAks4c5r43Rr8/pvhO3Nknxlb1TP+Tip8iCy78Xul8zj4+4gy+MsUfCeUq 08zLVdNxw9tpWalqVLw+wHD2ve1ZH7bcbgt/PEvJs3FIu+L0Y X-Received: by 2002:a05:6402:176c:: with SMTP id da12mr33224690edb.325.1618938174081; Tue, 20 Apr 2021 10:02:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdl79swpGzRKj/jpsHaqW6VwyUBf+m6mj1RkKyPHba49ZLDGdZ6WYjKjU75zRSIcsrZk10vA== X-Received: by 2002:a05:6402:176c:: with SMTP id da12mr33224668edb.325.1618938173929; Tue, 20 Apr 2021 10:02:53 -0700 (PDT) Received: from localhost.localdomain (xdsl-188-155-180-75.adslplus.ch. [188.155.180.75]) by smtp.gmail.com with ESMTPSA id s20sm16590714edu.93.2021.04.20.10.02.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Apr 2021 10:02:53 -0700 (PDT) From: Krzysztof Kozlowski To: Lee Jones , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Liam Girdwood , Mark Brown , Alessandro Zummo , Alexandre Belloni , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-rtc@vger.kernel.org Cc: Marek Szyprowski , Sylwester Nawrocki Subject: [PATCH 9/9] regulator: s2mps11: Drop initialization via platform data Date: Tue, 20 Apr 2021 19:02:44 +0200 Message-Id: <20210420170244.13467-5-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210420170244.13467-1-krzysztof.kozlowski@canonical.com> References: <20210420170118.12788-1-krzysztof.kozlowski@canonical.com> <20210420170244.13467-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org None of the platforms with S2MPS11 use board files, so any initialization via platform data can be safely removed. Signed-off-by: Krzysztof Kozlowski --- drivers/regulator/s2mps11.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index 33cf84bce05a..ebc67e3ddd4f 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c @@ -1120,7 +1120,6 @@ static const struct regulator_desc s2mpu02_regulators[] = { static int s2mps11_pmic_probe(struct platform_device *pdev) { struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent); - struct sec_platform_data *pdata = NULL; struct of_regulator_match *rdata = NULL; struct regulator_config config = { }; struct s2mps11_info *s2mps11; @@ -1171,17 +1170,6 @@ static int s2mps11_pmic_probe(struct platform_device *pdev) if (!s2mps11->ext_control_gpiod) return -ENOMEM; - if (!iodev->dev->of_node) { - if (iodev->pdata) { - pdata = iodev->pdata; - goto common_reg; - } else { - dev_err(pdev->dev.parent, - "Platform data or DT node not supplied\n"); - return -ENODEV; - } - } - rdata = kcalloc(rdev_num, sizeof(*rdata), GFP_KERNEL); if (!rdata) return -ENOMEM; @@ -1193,7 +1181,6 @@ static int s2mps11_pmic_probe(struct platform_device *pdev) if (ret) goto out; -common_reg: platform_set_drvdata(pdev, s2mps11); config.dev = &pdev->dev; @@ -1202,13 +1189,8 @@ static int s2mps11_pmic_probe(struct platform_device *pdev) for (i = 0; i < rdev_num; i++) { struct regulator_dev *regulator; - if (pdata) { - config.init_data = pdata->regulators[i].initdata; - config.of_node = pdata->regulators[i].reg_node; - } else { - config.init_data = rdata[i].init_data; - config.of_node = rdata[i].of_node; - } + config.init_data = rdata[i].init_data; + config.of_node = rdata[i].of_node; config.ena_gpiod = s2mps11->ext_control_gpiod[i]; /* * Hand the GPIO descriptor management over to the regulator