From patchwork Mon Jan 15 10:33:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 124493 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp623909lje; Mon, 15 Jan 2018 02:35:05 -0800 (PST) X-Google-Smtp-Source: ACJfBosSYeDCiJznlG2IQn5c2uhI9QX9cJqc4rbpVKM75rwZMWKNhNlc2ulXYJxTCt4VTCrU8rmk X-Received: by 10.98.207.6 with SMTP id b6mr22442640pfg.187.1516012505425; Mon, 15 Jan 2018 02:35:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516012505; cv=none; d=google.com; s=arc-20160816; b=MFGilh+lgwvajgDraSDS3umhs9hHa7YFY+Rzf2yZWig/H9ZciBOiQGZMPlTOtiKVHS PBxwajgoAtms2Ew04bLWXDUBHNSywCTEFgtyyQ4CDUotyPhP4LMFhhl8LwITVFJdBR1y iZtDDexzbLohvy1P3G44ALLlxcmNrCMo+jcqV9AxWWZ+ZyhfFDbU+9fKfEKYcKXQV5Vv /vjmfdpypAaMhHvQ4wbFjFA8xEFQdFdrelkaWieheCJ7/mGXrmTgTzOc+oHnXZFkmpE9 nigOhClK5HkKAVMcaopTNS7SNUGHlLN5M4DKt73FcYr4loDiKNV4pTSMkMqBjJHlYfnk zXRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=yScdUZFy0T+h9wA/nAA4HEcRAdo3iTr/6GLJsu78TxU=; b=f2N8ihH8GRiMSY/orAji96cykprvMmc8U4USz7Vvg/CbtS0fjLlEVHFxpuxAwJ0Q19 Ey60pGRxU+0C3lGykiAF9NBgVru3z64MbsX7uOMg9VMGMC/iKmYvsMuN/1lvUVDdnXyQ xcnfsZQ2bht1IrOchjZk7exMAaHTH5nAs4jl9eSj1E2OIRWrtwA7rPwBa0cKit9R+tE/ r2Q7KZT8V63Y6KpMRNXOUCuDh2YmhZO97+Ky2Nz9lWsx5XyvxHOnuBCxorfDDwVOGO69 m9ReeQUMVFLKHQhQyKVjyK6h0EDLRaEl3B3pbJ6hSIwdOFeLhdaaCVko9fZYqlavH01y pl7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b25si12657457pfc.241.2018.01.15.02.35.05; Mon, 15 Jan 2018 02:35:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754755AbeAOKfC (ORCPT + 6 others); Mon, 15 Jan 2018 05:35:02 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:43741 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754496AbeAOKfB (ORCPT ); Mon, 15 Jan 2018 05:35:01 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 90ABD20890; Mon, 15 Jan 2018 11:34:58 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 1592B207A2; Mon, 15 Jan 2018 11:34:48 +0100 (CET) From: Quentin Schulz To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, robh+dt@kernel.org, mark.rutland@arm.com, wens@csie.org, sre@kernel.org, linux@armlinux.org.uk, maxime.ripard@free-electrons.com, lee.jones@linaro.org Cc: linux-iio@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, thomas.petazzoni@free-electrons.com, linux-sunxi@googlegroups.com, julian.calaby@gmail.com, Quentin Schulz Subject: [PATCH v3 01/16] iio: adc: axp20x_adc: put ADC rate setting in a per-variant function Date: Mon, 15 Jan 2018 11:33:35 +0100 Message-Id: <9488159b43c4cc8418afa9d1562d972c4631cb02.1516012352.git-series.quentin.schulz@free-electrons.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: In-Reply-To: References: Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org To prepare for a new comer that set a different register with different values, move rate setting in a function that is specific to each AXP variant. Signed-off-by: Quentin Schulz --- drivers/iio/adc/axp20x_adc.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) -- git-series 0.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/iio/adc/axp20x_adc.c b/drivers/iio/adc/axp20x_adc.c index a30a972..3fc1b06 100644 --- a/drivers/iio/adc/axp20x_adc.c +++ b/drivers/iio/adc/axp20x_adc.c @@ -470,14 +470,18 @@ static const struct iio_info axp22x_adc_iio_info = { .read_raw = axp22x_read_raw, }; -static int axp20x_adc_rate(int rate) +static int axp20x_adc_rate(struct axp20x_adc_iio *info, int rate) { - return AXP20X_ADC_RATE_HZ(rate); + return regmap_update_bits(info->regmap, AXP20X_ADC_RATE, + AXP20X_ADC_RATE_MASK, + AXP20X_ADC_RATE_HZ(rate)); } -static int axp22x_adc_rate(int rate) +static int axp22x_adc_rate(struct axp20x_adc_iio *info, int rate) { - return AXP22X_ADC_RATE_HZ(rate); + return regmap_update_bits(info->regmap, AXP20X_ADC_RATE, + AXP20X_ADC_RATE_MASK, + AXP22X_ADC_RATE_HZ(rate)); } struct axp_data { @@ -485,7 +489,8 @@ struct axp_data { int num_channels; struct iio_chan_spec const *channels; unsigned long adc_en1_mask; - int (*adc_rate)(int rate); + int (*adc_rate)(struct axp20x_adc_iio *info, + int rate); bool adc_en2; struct iio_map *maps; }; @@ -554,8 +559,7 @@ static int axp20x_probe(struct platform_device *pdev) AXP20X_ADC_EN2_MASK, AXP20X_ADC_EN2_MASK); /* Configure ADCs rate */ - regmap_update_bits(info->regmap, AXP20X_ADC_RATE, AXP20X_ADC_RATE_MASK, - info->data->adc_rate(100)); + info->data->adc_rate(info, 100); ret = iio_map_array_register(indio_dev, info->data->maps); if (ret < 0) { From patchwork Mon Jan 15 10:33:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 124494 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp623918lje; Mon, 15 Jan 2018 02:35:07 -0800 (PST) X-Google-Smtp-Source: ACJfBost1bLnGgLLJsvTgiT13ZDA6kduWiwLWvBvWkIFNJ8ak0dkL5n7U1t+9/O5n+VGQrzvuHUA X-Received: by 10.159.233.139 with SMTP id bh11mr34439657plb.149.1516012507244; Mon, 15 Jan 2018 02:35:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516012507; cv=none; d=google.com; s=arc-20160816; b=znX0H9DLeZArP6vPkqFFs+5VesqU1frrmFdU/ib6q7cGPg2jCqvpX9CEezmT15+NlB K5FQ+FKaNqThupzQrlMa3mX7kXnP3zQoI/z462JjzJPe9yTOxul/DYsWs+kf9hy3Lfr1 faWksOQfQyh0kFYK1ElNILqPBojJzWMQYEz0MP2HFLJtG9dccv5xGFkg7xBDSo+uyw1N 70M3zSRrVWeLaCNp48NB578E4HnOpQ8Iim1NL1ugOmFq+TjPaYsyEO4fPiylGmCSYMSO q1HDsFu/a/twM9EXafqxCuKvf66PQQDr7bYRAN8AE1frzQ895QV5zWRilVVGwrGBbrAi +4XA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=kvON9+RqSLDTmS0sIvsTh5GnjJtwB2oZo+CO2Zzu7Z4=; b=XHPviWRs5/oMEydIlzLETgrJfFJ85Y+gOZrRwbbBI9/qKz9nYTwk54VivvnpDlECbH UYBWrz9QVOKNF1LlVIg9/huJqZ1uAe7V6ygloIJwLQhplcMC180OQW2/GskCIkUg3OEx 4dVQs9OPPg8hm+eyJ9l4fnE1RsZ6cbD6YX885Zc103abynB7hHwgXvp4EIG2+AL01+dw MTnBgS/zYdw/a4O9cH6L7KP5Y1OtoiJaq39mytEXZT0YRkiVRP80uMEMHmCZ6xzp7xaE kGsgFzTtN9X76ourV+YmpVdNhRccgaaqoR1YB6OUPvugs04IiZp18dHF00hDCg9aAq9H yhlw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z190si4144448pgb.808.2018.01.15.02.35.07; Mon, 15 Jan 2018 02:35:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933627AbeAOKfE (ORCPT + 6 others); Mon, 15 Jan 2018 05:35:04 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:43756 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754540AbeAOKfB (ORCPT ); Mon, 15 Jan 2018 05:35:01 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 0C71A207A2; Mon, 15 Jan 2018 11:34:59 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 8559B207A4; Mon, 15 Jan 2018 11:34:48 +0100 (CET) From: Quentin Schulz To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, robh+dt@kernel.org, mark.rutland@arm.com, wens@csie.org, sre@kernel.org, linux@armlinux.org.uk, maxime.ripard@free-electrons.com, lee.jones@linaro.org Cc: linux-iio@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, thomas.petazzoni@free-electrons.com, linux-sunxi@googlegroups.com, julian.calaby@gmail.com, Quentin Schulz Subject: [PATCH v3 02/16] dt-bindings: iio: adc: add binding for X-Powers AXP PMICs ADC Date: Mon, 15 Jan 2018 11:33:36 +0100 Message-Id: <8191dd8cc334049b8b91a231f9f276b6d0689628.1516012352.git-series.quentin.schulz@free-electrons.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: In-Reply-To: References: Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Powers PMICs have several ADC channels that can be used for different purposes, e.g. PMIC internal temperature, battery voltage or AC current. This is the documentation for AXP209, AXP221/223 and AXP813 ADC bindings. Signed-off-by: Quentin Schulz Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/iio/adc/axp20x_adc.txt | 48 +++++++++- 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/axp20x_adc.txt -- git-series 0.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/devicetree/bindings/iio/adc/axp20x_adc.txt b/Documentation/devicetree/bindings/iio/adc/axp20x_adc.txt new file mode 100644 index 0000000..7a63139 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/axp20x_adc.txt @@ -0,0 +1,48 @@ +* X-Powers AXP ADC bindings + +Required properties: + - compatible: should be one of: + - "x-powers,axp209-adc", + - "x-powers,axp221-adc", + - "x-powers,axp813-adc", + - #io-channel-cells: should be 1, + +Example: + +&axp22x { + adc { + compatible = "x-powers,axp221-adc"; + #io-channel-cells = <1>; + }; +}; + +ADC channels and their indexes per variant: + +AXP209 +------ + 0 | acin_v + 1 | acin_i + 2 | vbus_v + 3 | vbus_i + 4 | pmic_temp + 5 | gpio0_v + 6 | gpio1_v + 7 | ipsout_v + 8 | batt_v + 9 | batt_chrg_i +10 | batt_dischrg_i + +AXP22x +------ + 0 | pmic_temp + 1 | batt_v + 2 | batt_chrg_i + 3 | batt_dischrg_i + +AXP813 +------ + 0 | pmic_temp + 1 | gpio0_v + 2 | batt_v + 3 | batt_chrg_i + 4 | batt_dischrg_i From patchwork Mon Jan 15 10:33:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 124495 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp623962lje; Mon, 15 Jan 2018 02:35:17 -0800 (PST) X-Google-Smtp-Source: ACJfBovOGpaO82HNRWeh+5EefjDSHegGDEK4MHmTP7ncfunoenxNm89p33XaWEz6CSjSWP+Y7uyk X-Received: by 10.159.252.71 with SMTP id t7mr29095777plz.344.1516012517364; Mon, 15 Jan 2018 02:35:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516012517; cv=none; d=google.com; s=arc-20160816; b=llvFnNiOhUtlaQO99ADUKxWoXuckG0yyGy1Rz6Qk0FZsqgPuqzWhni/qRtTTUoLf+n AdLJ9LSDTJkSnDkMs6XO13OGtO3SaLSlpZdxq9lhpGXY2bTVVdMe/4AWMPi7WzT4sFkQ bLNP7ND/Zjd2I46sGKR3FXZwMkHSUTeVR/tGHzA2lbOyvVQ4RQg+MI8B0KMhvE6u/NBb CdiOAjEE4wefUnqKSpCwkFmup047m2IBA0HlN01CmaF/NVocTgP9VmGJcGuu+3JtaagM 8tdEW1qJWWPV9+I9xr2SiVsqnr5x5txLd0D4zdqtf9A9kftbwVXbbSHVq0VWyQsmXgRu Puwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=P6/pUTlWg/xQujaG2OY3JoWbHdi+y8jLARnbtcmlp7Q=; b=LTBWLGu672u99JWsJ+pSjK6YU6dJNHvJeFfULXWVzzcdeuezDTiKk3hHN+Alz6Iclt dFtBIkfhjIT0XZ5h2euH8cqiFusSBg31cdF+T7tjG1QyRCoJYU+R7iPbZw4VhfBDY+TT pLBAQemATDR32Lmf1bZ1H7kGCzcPFWVshA5tRgMBPWzwOgKVPjMWl7uQ+KTfu4DWaWaO Y0z0FdoIKApd9/JpHljUXvB2hN7OxX1smYGs2Z6E+51w5Ve4CnQzt8YXlsg1wdQxxCB2 uu2ypMiya6pEAGTfCVh0Y1+S7hRSDayHa0FMSWD0ktMYM2sZTcnX6Lmvh6Kqm9N7aydB j4zA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c134si11176851pga.329.2018.01.15.02.35.17; Mon, 15 Jan 2018 02:35:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755354AbeAOKfN (ORCPT + 6 others); Mon, 15 Jan 2018 05:35:13 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:43818 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755325AbeAOKfL (ORCPT ); Mon, 15 Jan 2018 05:35:11 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id AB1D0208A8; Mon, 15 Jan 2018 11:35:08 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 4461820885; Mon, 15 Jan 2018 11:34:51 +0100 (CET) From: Quentin Schulz To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, robh+dt@kernel.org, mark.rutland@arm.com, wens@csie.org, sre@kernel.org, linux@armlinux.org.uk, maxime.ripard@free-electrons.com, lee.jones@linaro.org Cc: linux-iio@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, thomas.petazzoni@free-electrons.com, linux-sunxi@googlegroups.com, julian.calaby@gmail.com, Quentin Schulz Subject: [PATCH v3 08/16] ARM: dtsi: axp81x: add node for ADC Date: Mon, 15 Jan 2018 11:33:42 +0100 Message-Id: X-Mailer: git-send-email 2.14.1 In-Reply-To: References: In-Reply-To: References: Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds a DT node for the ADC of the PMIC so that there can be consumers of its IIO channels declaring their consumptions via DT. Signed-off-by: Quentin Schulz --- arch/arm/boot/dts/axp81x.dtsi | 5 +++++ 1 file changed, 5 insertions(+) -- git-series 0.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/boot/dts/axp81x.dtsi b/arch/arm/boot/dts/axp81x.dtsi index fd55b89..6b5e7bc 100644 --- a/arch/arm/boot/dts/axp81x.dtsi +++ b/arch/arm/boot/dts/axp81x.dtsi @@ -48,6 +48,11 @@ interrupt-controller; #interrupt-cells = <1>; + axp_adc: adc { + compatible = "x-powers,axp813-adc"; + #io-channel-cells = <1>; + }; + axp_gpio: axp-gpio { compatible = "x-powers,axp813-gpio"; gpio-controller; From patchwork Mon Jan 15 10:33:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 124505 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp624914lje; Mon, 15 Jan 2018 02:39:03 -0800 (PST) X-Google-Smtp-Source: ACJfBos70DIOBli7hsA/ibjD47g2qrMb+C0Qhd7GenIHeoMtVa9NTAGFc203EB69i7yxMKUpUNB3 X-Received: by 10.84.217.194 with SMTP id d2mr26792961plj.306.1516012743819; Mon, 15 Jan 2018 02:39:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516012743; cv=none; d=google.com; s=arc-20160816; b=q3cRo6omhO2loDhRSojezBSCuZnc5VHXIrDuFyll4TLFe0fGHCnYItFDn3Mfk3+f0k Yin6akcS0qc2VQmBZWmXk75TSYKnIje1RWRDEXjh2f+t/VQPJosBfdCF4p//KwcnBlKP pLOQEB28kvaAUYTtNEheoKxj8jsZska02/HB2ttsq731mm9YpQ9PSks82xB20WiDrhs7 L4qXCexgJOEhA6/8hvn2qWq+/i2GIVyz3dRxbjXuMFydcBfWEmNknz8TD27+x3LkL61g 2VPnX4WzuIir1kYlJsPJ4JFzPRSjPiXm9sB7MvaJ4Sie0cvWZ4xU4vKobCTdVR7How+N wOLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Zs/YLqR/nJZ0F5fLQ2Z4vKzgWkGA3I3srTvG8MfkBGI=; b=FtPJXdSQJ/VTW5sxIPTaHlH5+OfaVnA1jR/A26K7oG5Nxa7kZJ3XvwTPYuvBTJS0I5 77GK118/7wDeHlLEv5g0Jqfn0QO/N4w5q9Z568s+plSwKYK2Ds8EPTQr2ix2c7tqJiS2 JYB+cNQxjtRxEEDHcr20h86G+XHgdoqZQqLAXyu0IqOCKDIrSTNcH6LL1uKP1K7rSZGS aA/KaIxlrWqcAI6xJhho68gKokmbzuMu8RqfiuvuJhSbVLcVmhZ7awUTBMw1pcSYSaQR kLvCemv21q2yEOH87VEOOWX7QnJSyWoAwyfdaOi1uFRzsU9PaOAUUAqKyWb1cEsTIAJr XWuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k70si5101963pgd.173.2018.01.15.02.39.03; Mon, 15 Jan 2018 02:39:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755387AbeAOKjB (ORCPT + 6 others); Mon, 15 Jan 2018 05:39:01 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:43847 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755339AbeAOKfL (ORCPT ); Mon, 15 Jan 2018 05:35:11 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 2249820884; Mon, 15 Jan 2018 11:35:09 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id B46CD20886; Mon, 15 Jan 2018 11:34:51 +0100 (CET) From: Quentin Schulz To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, robh+dt@kernel.org, mark.rutland@arm.com, wens@csie.org, sre@kernel.org, linux@armlinux.org.uk, maxime.ripard@free-electrons.com, lee.jones@linaro.org Cc: linux-iio@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, thomas.petazzoni@free-electrons.com, linux-sunxi@googlegroups.com, julian.calaby@gmail.com, Quentin Schulz Subject: [PATCH v3 09/16] mfd: axp20x: probe axp20x_adc driver for AXP813 Date: Mon, 15 Jan 2018 11:33:43 +0100 Message-Id: X-Mailer: git-send-email 2.14.1 In-Reply-To: References: In-Reply-To: References: Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This makes the axp20x_adc driver probe with platform device id "axp813-adc". Signed-off-by: Quentin Schulz --- drivers/mfd/axp20x.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- git-series 0.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mfd/axp20x.c b/drivers/mfd/axp20x.c index 1977a03..e5516aa 100644 --- a/drivers/mfd/axp20x.c +++ b/drivers/mfd/axp20x.c @@ -885,7 +885,10 @@ static struct mfd_cell axp813_cells[] = { }, { .name = "axp20x-gpio", .of_compatible = "x-powers,axp813-gpio", - } + }, { + .name = "axp813-adc", + .of_compatible = "x-powers,axp813-adc", + }, }; static struct axp20x_dev *axp20x_pm_power_off; From patchwork Mon Jan 15 10:33:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 124504 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp624908lje; Mon, 15 Jan 2018 02:39:03 -0800 (PST) X-Google-Smtp-Source: ACJfBouHyLCM0bnZglxSVnHZH1PXQ81EjnjBOySn2voxNWBnYqr43Ubz/ROW/6if0RP+9a0ycll+ X-Received: by 10.159.245.138 with SMTP id a10mr34680563pls.178.1516012743542; Mon, 15 Jan 2018 02:39:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516012743; cv=none; d=google.com; s=arc-20160816; b=ugr1hPhsxtvUqERMkiTEtY2bAOBdbIqimd5lrfm7EVSCa3pJrvKXezuWSmDw0u+Qr+ AIztDJqmvm4PJmHo8lcIgC3HJb5xR2mMDSYO3l0QJAweHV60qMS2is4W0umHk8n7jTB0 Y6hPXkiyGjq3NXZlZMX+vmebKzz2pI4XotOWHN0bZpUxRHwlxE4ArpLJL7nqwOfWPZGx jqco0uhua+Ej/QTsWK/iXwOWrkYJy31gRmrnZGWVHSN6CeUKIJRiodtRFIBplKJrs4Iu qeZUZZdtQBX0EhshqjHH3Yi9TirKoQOOMJYIF6xRFwKvn0vzJqtjzyU+faj4Uh3M5TOb eRlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=uJlwAfInJqj6hctVcp7/4mhSWAMSfDYS1P0F1sXIesQ=; b=HRHAP4lKOt4Fs0M9uiVFslSDKilEfWVaWPLbqb9bwZzvtuQtH6615kjk/TMmfJyy2Z YM54OHCydd8z6WWJcRMtzcuCAa9tMwiev4xyzDS6vzH+8IipdFprU77n3KEYX0eehpfL OjjY6fnAhavTZUmzhEGTIrXqlNZTupbq8++IAAAyixAInPR/zfemWkMPDyawialk2s1u 75xvJ/Pk+lFh4Pybo++qijl2GEYg/2xUu26r26yesqYR2GelXxRNM++UayuavcIZYnLD FnsACmwy8hV67GUiY94hDRs1NXaxfau3o4Y+HZIjPyHWD7ZAGDjodM4L2f9GqlokwZ+r eg1A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k70si5101963pgd.173.2018.01.15.02.39.03; Mon, 15 Jan 2018 02:39:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755346AbeAOKjA (ORCPT + 6 others); Mon, 15 Jan 2018 05:39:00 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:43906 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755343AbeAOKfM (ORCPT ); Mon, 15 Jan 2018 05:35:12 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 935DD208AA; Mon, 15 Jan 2018 11:35:09 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id A87BC20888; Mon, 15 Jan 2018 11:34:52 +0100 (CET) From: Quentin Schulz To: jic23@kernel.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, robh+dt@kernel.org, mark.rutland@arm.com, wens@csie.org, sre@kernel.org, linux@armlinux.org.uk, maxime.ripard@free-electrons.com, lee.jones@linaro.org Cc: linux-iio@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, thomas.petazzoni@free-electrons.com, linux-sunxi@googlegroups.com, julian.calaby@gmail.com, Quentin Schulz Subject: [PATCH v3 11/16] dt-bindings: power: supply: axp20x: add AXP813 battery DT binding Date: Mon, 15 Jan 2018 11:33:45 +0100 Message-Id: <7b53727c33207f4b7ae36218c99abfb86876e716.1516012352.git-series.quentin.schulz@free-electrons.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: In-Reply-To: References: Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The AXP813 can have a battery as power supply, so let's add it to the list of compatibles. Signed-off-by: Quentin Schulz Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/power/supply/axp20x_battery.txt | 8 +++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- git-series 0.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/devicetree/bindings/power/supply/axp20x_battery.txt b/Documentation/devicetree/bindings/power/supply/axp20x_battery.txt index c248866..41916f6 100644 --- a/Documentation/devicetree/bindings/power/supply/axp20x_battery.txt +++ b/Documentation/devicetree/bindings/power/supply/axp20x_battery.txt @@ -4,12 +4,12 @@ Required Properties: - compatible, one of: "x-powers,axp209-battery-power-supply" "x-powers,axp221-battery-power-supply" + "x-powers,axp813-battery-power-supply" -This node is a subnode of the axp20x/axp22x PMIC. +This node is a subnode of its respective PMIC DT node. -The AXP20X and AXP22X can read the battery voltage, charge and discharge -currents of the battery by reading ADC channels from the AXP20X/AXP22X -ADC. +The supported devices can read the battery voltage, charge and discharge +currents of the battery by reading ADC channels from the ADC. Example: