From patchwork Wed Feb 13 22:24:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Menefy X-Patchwork-Id: 10810983 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E4539746 for ; Wed, 13 Feb 2019 22:25:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D21AD2D028 for ; Wed, 13 Feb 2019 22:25:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C228C2D193; Wed, 13 Feb 2019 22:25:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62CEF2D028 for ; Wed, 13 Feb 2019 22:25:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392508AbfBMWZA (ORCPT ); Wed, 13 Feb 2019 17:25:00 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37113 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388723AbfBMWZA (ORCPT ); Wed, 13 Feb 2019 17:25:00 -0500 Received: by mail-wr1-f68.google.com with SMTP id c8so4348262wrs.4 for ; Wed, 13 Feb 2019 14:24:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mathembedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PvAO/6uQ3rM1kwF8ijOzVJfqznQ9Ss07X4DJx6RF6go=; b=U5aEVNCxMWrVl4ZYOfmDjIrXW/OFtpJ05w5Xt+3Qg8wgeGI8JrG7V8wVrTJdhYscjV z5lRAx3+XwtbznwZoz07Fad2M/BDhUjaH/GW/9dssKIuDFk9NXLPZx2GvOKPahy/p0/k HH5UeX+Yl2bGzSETa2WfauNDuINKxB+yuwb9RFLR9MwssIsQW85o5O9Bd1dSyKDnub2d UPDxhcMzuJ55TZtdvILn8J8t0a5+Bc9hgTxTfoO2L1oH8GmTa8u8HZhoL5RIp+qyqcMq jfr9JYMt8uY2Xxd0pk+6TgOEo7vspVPXCjao+Kr9p1EicR7Wt6WTP2/tH360lmKrFwdH S1mQ== 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; bh=PvAO/6uQ3rM1kwF8ijOzVJfqznQ9Ss07X4DJx6RF6go=; b=seD3SF4L6jbDYx7g6EYNmYA1C5Xy0bJ5OFvX8y2WJHVoFmdtdMzqs1VADe433FuIx1 zYYD6eaI2bxcMuV/BQPUH/K4EC2F/xkS91mXF99htjyycGIbFf5eXLtYc/i9lbXdyF/K yR4iusXgOft6AMGdEXyUpnsA2iie59JqgEgFeBHLV0xnvXbdOzK1bfhgj95m4HZKgKdu xl3hcT562+PK3pCuSj9x/ChWz6xo1sVqKn8X8Y0Sagbo9FpjJZl8ZZP5Lcdb7NPMQQk9 rx1IEvpfBHmVWuFwrxq2K75hmTF4g84zh36qyZ/PeTFqXdVPAao455iWRZc+l0hpd0mR mFzQ== X-Gm-Message-State: AHQUAuZfeYfCItvgs9vjolHMHl8miKkJikWT+XIXZpNGWgRYdHyKKEs7 sxkBhLv5/aessR0KImIK18AzlCjcC73QpA== X-Google-Smtp-Source: AHgI3IYaJ7fpkqBRpBqGEHWV8SWT+9hqrBagMw1HWoABd0x++ifz0VvUdgdX+S76zhG1FEAlBQ1S9g== X-Received: by 2002:adf:a147:: with SMTP id r7mr244239wrr.5.1550096698561; Wed, 13 Feb 2019 14:24:58 -0800 (PST) Received: from diamond.mathembedded.com (host86-176-243-198.range86-176.btcentralplus.com. [86.176.243.198]) by smtp.gmail.com with ESMTPSA id h71sm788330wme.20.2019.02.13.14.24.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Feb 2019 14:24:57 -0800 (PST) From: Stuart Menefy To: Sangbeom Kim , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Lee Jones , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Stuart Menefy Subject: [PATCH v3 1/2] mfd: sec: Put one element structure initialisation on one line Date: Wed, 13 Feb 2019 22:24:01 +0000 Message-Id: <20190213222402.20541-2-stuart.menefy@mathembedded.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20190213222402.20541-1-stuart.menefy@mathembedded.com> References: <20190213222402.20541-1-stuart.menefy@mathembedded.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Change the layout of the initialisation of structures with one element to a single line of code. This keeps the coding style consistent. Signed-off-by: Stuart Menefy --- drivers/mfd/sec-core.c | 58 +++++++++++++++++--------------------------------- 1 file changed, 19 insertions(+), 39 deletions(-) diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index e0835c9df7a1..5ff3fd726f9e 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -28,45 +28,33 @@ #include static const struct mfd_cell s5m8751_devs[] = { - { - .name = "s5m8751-pmic", - }, { - .name = "s5m-charger", - }, { - .name = "s5m8751-codec", - }, + { .name = "s5m8751-pmic", }, + { .name = "s5m-charger", }, + { .name = "s5m8751-codec", }, }; static const struct mfd_cell s5m8763_devs[] = { - { - .name = "s5m8763-pmic", - }, { - .name = "s5m-rtc", - }, { - .name = "s5m-charger", - }, + { .name = "s5m8763-pmic", }, + { .name = "s5m-rtc", }, + { .name = "s5m-charger", }, }; static const struct mfd_cell s5m8767_devs[] = { + { .name = "s5m8767-pmic", }, + { .name = "s5m-rtc", }, { - .name = "s5m8767-pmic", - }, { - .name = "s5m-rtc", - }, { .name = "s5m8767-clk", .of_compatible = "samsung,s5m8767-clk", - } + }, }; static const struct mfd_cell s2mps11_devs[] = { + { .name = "s2mps11-regulator", }, + { .name = "s2mps14-rtc", }, { - .name = "s2mps11-regulator", - }, { - .name = "s2mps14-rtc", - }, { .name = "s2mps11-clk", .of_compatible = "samsung,s2mps11-clk", - } + }, }; static const struct mfd_cell s2mps13_devs[] = { @@ -79,37 +67,29 @@ static const struct mfd_cell s2mps13_devs[] = { }; static const struct mfd_cell s2mps14_devs[] = { + { .name = "s2mps14-regulator", }, + { .name = "s2mps14-rtc", }, { - .name = "s2mps14-regulator", - }, { - .name = "s2mps14-rtc", - }, { .name = "s2mps14-clk", .of_compatible = "samsung,s2mps14-clk", - } + }, }; static const struct mfd_cell s2mps15_devs[] = { + { .name = "s2mps15-regulator", }, + { .name = "s2mps15-rtc", }, { - .name = "s2mps15-regulator", - }, { - .name = "s2mps15-rtc", - }, { .name = "s2mps13-clk", .of_compatible = "samsung,s2mps13-clk", }, }; static const struct mfd_cell s2mpa01_devs[] = { - { - .name = "s2mpa01-pmic", - }, + { .name = "s2mpa01-pmic", }, }; static const struct mfd_cell s2mpu02_devs[] = { - { - .name = "s2mpu02-regulator", - }, + { .name = "s2mpu02-regulator", }, }; #ifdef CONFIG_OF From patchwork Wed Feb 13 22:24:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stuart Menefy X-Patchwork-Id: 10810985 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2964E746 for ; Wed, 13 Feb 2019 22:25:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 160122D028 for ; Wed, 13 Feb 2019 22:25:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 072352D193; Wed, 13 Feb 2019 22:25:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E383B2D028 for ; Wed, 13 Feb 2019 22:25:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404274AbfBMWZF (ORCPT ); Wed, 13 Feb 2019 17:25:05 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:39806 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404266AbfBMWZD (ORCPT ); Wed, 13 Feb 2019 17:25:03 -0500 Received: by mail-wr1-f67.google.com with SMTP id l5so3261049wrw.6 for ; Wed, 13 Feb 2019 14:25:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mathembedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FEWpcrAzfnrCaSQuYe7fm49TUBEKGhf/xqry+uLQyng=; b=wR4EEsRlXSmqKa1MPOaBx78S3klJIcl3XtmzAdKfYqBpSeVfaQyxbKi2a9bibiIeoK qW6tEvQcO1HflLHMig3R2+gb3Hfl47rk9aP+5xKrZEUPjd4w6tTl16Wy92pwR+zVHVgS Z9/aXGtUCcWbt+6eGS5em+I7QweDMwPBNl/n5VMNbk+r+O/IYYxZLFvdBu7wBJUaNMlD x78OmUWaVhTBdd20DX0Zc2XCRU6u4CxgOfypCbpzr8c5F3RiKaeTXcH6fmR4vPy4CWXs qqGRBrJQ1Zj3u82ToeNXVYdz3GB8B+Clvo/T4AuLo25jykzjOKxNX9koUH3ETOs7WGq8 BTbQ== 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; bh=FEWpcrAzfnrCaSQuYe7fm49TUBEKGhf/xqry+uLQyng=; b=q80ueZp6sxw4ngsLHJQZUmJVuy/B9tAsTwn5HGrSOkihLXROGvGepb2zWO6yate8lB 53ak8TUbgpjpks+hq+8tUFVC+qLxQLoTHAgL9q+GGQ9k8pyxTz+cy0OtPeqnKUgPT7+e 44/tb3KFvV+O1dlt5siugMctbtgRPZCPuMeZMImpJzmPaNzbzQTWKSH6jr4BvewtAbHN osnjcvWCDpfef6oHoXNUYSdk3eP0igosYr3lBK3kU8LIQ0V5BovD+ucu4138KlY78AdL UWuhaRCyo3YsuTwDXUioZm82x04VXpEh9krgp9h3CF/X/6tiP83oXgRsAGKtb19OedL8 z6Wg== X-Gm-Message-State: AHQUAuZJnS0PRsB9w5U9JW5H9BEv9g+kfPC8DwnHVMB5CNhYrscPtp9q a6bXLQkQxcrqegk8qB9yYJCQ6A== X-Google-Smtp-Source: AHgI3IYgPMDeFKq9B0jF4bIuhkXOPdI5t5MQanvGHeIAHYWsVAg5FW0nq+RWXMXFLEfw/903RWFsiA== X-Received: by 2002:adf:dc10:: with SMTP id t16mr288086wri.40.1550096701900; Wed, 13 Feb 2019 14:25:01 -0800 (PST) Received: from diamond.mathembedded.com (host86-176-243-198.range86-176.btcentralplus.com. [86.176.243.198]) by smtp.gmail.com with ESMTPSA id h71sm788330wme.20.2019.02.13.14.25.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Feb 2019 14:25:01 -0800 (PST) From: Stuart Menefy To: Sangbeom Kim , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Lee Jones , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Stuart Menefy Subject: [PATCH v3 2/2] mfd: sec: Add support for the RTC on S2MPA01 Date: Wed, 13 Feb 2019 22:24:02 +0000 Message-Id: <20190213222402.20541-3-stuart.menefy@mathembedded.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20190213222402.20541-1-stuart.menefy@mathembedded.com> References: <20190213222402.20541-1-stuart.menefy@mathembedded.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The RTC portion of the S2MPA01 appears to have the same register layout as the S2MPS14. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Stuart Menefy --- drivers/mfd/sec-core.c | 1 + drivers/mfd/sec-irq.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 5ff3fd726f9e..8a299080cb55 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c @@ -86,6 +86,7 @@ static const struct mfd_cell s2mps15_devs[] = { static const struct mfd_cell s2mpa01_devs[] = { { .name = "s2mpa01-pmic", }, + { .name = "s2mps14-rtc", }, }; static const struct mfd_cell s2mpu02_devs[] = { diff --git a/drivers/mfd/sec-irq.c b/drivers/mfd/sec-irq.c index ad0099077e7e..a98c5d165039 100644 --- a/drivers/mfd/sec-irq.c +++ b/drivers/mfd/sec-irq.c @@ -455,6 +455,9 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic) case S5M8767X: sec_irq_chip = &s5m8767_irq_chip; break; + case S2MPA01: + sec_irq_chip = &s2mps14_irq_chip; + break; case S2MPS11X: sec_irq_chip = &s2mps11_irq_chip; break;