[PATCH v8 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-06-22 Thread David Collins
the final PMIC regulator hardware state. Signed-off-by: David Collins Reviewed-by: Rob Herring Reviewed-by: Douglas Anderson --- .../bindings/regulator/qcom,rpmh-regulator.txt | 160 + .../dt-bindings/regulator/qcom,rpmh-regulator.h| 36 + 2 files changed, 196

[PATCH v8 2/2] regulator: add QCOM RPMh regulator driver

2018-06-22 Thread David Collins
enable state, voltage, and mode. XOB supports manipulation of enable state. Signed-off-by: David Collins Reviewed-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- drivers/regulator/Kconfig | 9 + drivers/regulator/Makefile | 1 + drivers/regulator/qcom-rpmh

[PATCH v8 0/2] regulator: add QCOM RPMh regulator driver

2018-06-22 Thread David Collins
kml.org/lkml/2018/6/18/1188 [7]: https://lkml.org/lkml/2018/6/8/573 [8]: https://lkml.org/lkml/2018/6/4/879 [9]: https://lkml.org/lkml/2018/6/1/895 [10]: https://lkml.org/lkml/2018/5/22/1168 [11]: https://lkml.org/lkml/2018/5/11/701 [12]: https://lkml.org/lkml/2018/4/13/687 [13]: https://lkml.org/lkml

Re: [PATCH] regulator: qcom-rpmh: Add stylistic breaks in the default cases

2018-08-10 Thread David Collins
-566,6 +568,7 @@ static unsigned int > rpmh_regulator_pmic4_bob_of_map_mode(unsigned int rpmh_mode) > break; > default: > mode = REGULATOR_MODE_INVALID; > + break; > } > > return mode; Reviewed-by: David Collins -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project

Re: [PATCH 3/3] arm64: dts: qcom: pm8998: Add thermal zone

2018-07-11 Thread David Collins
Hello Doug, > On Tue, Jul 10, 2018 at 10:45 AM, David Collins > wrote: >> On 06/29/2018 04:54 PM, Matthias Kaehlcke wrote: >>> On Fri, Jun 29, 2018 at 02:29:55PM -0700, David Collins wrote: >> ... >>>> The PMIC TEMP_ALARM hardware peripheral will perform

Re: [PATCH 3/3] arm64: dts: qcom: pm8998: Add thermal zone

2018-07-11 Thread David Collins
Hello Doug, On 07/11/2018 03:43 PM, Doug Anderson wrote: > On Wed, Jul 11, 2018 at 3:36 PM, David Collins > wrote: >>> On Tue, Jul 10, 2018 at 10:45 AM, David Collins >>> wrote: >>>> On 06/29/2018 04:54 PM, Matthias Kaehlcke wrote: >>>>> On F

Re: [PATCH v8 2/2] regulator: add QCOM RPMh regulator driver

2018-07-12 Thread David Collins
On 07/12/2018 09:54 AM, Mark Brown wrote: > On Mon, Jul 09, 2018 at 04:44:14PM -0700, David Collins wrote: >> On 07/02/2018 03:28 AM, Mark Brown wrote: >>> On Fri, Jun 22, 2018 at 05:46:14PM -0700, David Collins wrote: >>>> +static unsigned int rpmh_regulator_pmic

[PATCH v9 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-07-13 Thread David Collins
the final PMIC regulator hardware state. Signed-off-by: David Collins Reviewed-by: Rob Herring Reviewed-by: Douglas Anderson --- .../bindings/regulator/qcom,rpmh-regulator.txt | 160 + .../dt-bindings/regulator/qcom,rpmh-regulator.h| 36 + 2 files changed, 196

[PATCH v9 2/2] regulator: add QCOM RPMh regulator driver

2018-07-13 Thread David Collins
enable state, voltage, and mode. XOB supports manipulation of enable state. Signed-off-by: David Collins Reviewed-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke --- drivers/regulator/Kconfig | 9 + drivers/regulator/Makefile | 1 + drivers/regulator/qcom-rpmh

[PATCH v9 0/2] regulator: add QCOM RPMh regulator driver

2018-07-13 Thread David Collins
ttps://lkml.org/lkml/2018/5/22/1168 [12]: https://lkml.org/lkml/2018/5/11/701 [13]: https://lkml.org/lkml/2018/4/13/687 [14]: https://lkml.org/lkml/2018/3/16/1431 David Collins (2): regulator: dt-bindings: add QCOM RPMh regulator bindings regulator: add QCOM RPMh regulator driver .../binding

Re: [PATCH] regulator: fix platform_no_drv_owner.cocci warnings

2018-03-19 Thread David Collins
On 03/18/2018 01:38 PM, kbuild test robot wrote: > From: Fengguang Wu > > drivers/regulator/qcom_rpmh-regulator.c:1104:3-8: > No need to set .owner here. The core will do it. Thanks for pointing this out. > --- a/drivers/regulator/qcom_rpmh-regulator.c > +++ b/drivers/regulator/qcom_rpmh-regul

Re: [PATCH 2/2] dt-bindings: regulator: add QCOM RPMh regulator bindings

2018-03-21 Thread David Collins
Hello Doug, On 03/20/2018 07:16 PM, Doug Anderson wrote: >> +Qualcomm Technologies, Inc. RPMh Regulators >> + >> +rpmh-regulator devices support PMIC regulator management via the VRM and XOB >> +RPMh accelerators. The APPS processor communicates with these hardware >> blocks >> +via an RSC using

Re: [PATCH 1/2] regulator: add QCOM RPMh regulator driver

2018-03-22 Thread David Collins
Hello Doug, Thank you for the very detailed review feedback. On 03/20/2018 07:16 PM, Doug Anderson wrote: > On Fri, Mar 16, 2018 at 6:09 PM, David Collins > wrote: >> +/** >> + * struct rpmh_regulator_mode - RPMh VRM mode attributes >> + * @pmic_mode:

Re: [PATCH 1/2] regulator: add QCOM RPMh regulator driver

2018-03-22 Thread David Collins
Hello Stephen, Thank you for the very detailed review feedback. On 03/21/2018 12:07 PM, Stephen Boyd wrote: > Quoting David Collins (2018-03-16 18:09:10) >> diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig >> index 097f617..e0ecd0a 100644 >> --- a/driv

Re: [PATCH 3/3] arm64: dts: qcom: pm8998: Add thermal zone

2018-06-29 Thread David Collins
that a hardware shutdown kicks in at stage 2 (135°C ?). This > would be roughly in line with a system reset I observed in an earlier > test at a temperature > 125°C. If that's correct the trip points need > to be revisited. > > Maybe David Collins who recently extended the driver to

Re: [PATCH v8 2/2] regulator: add QCOM RPMh regulator driver

2018-07-09 Thread David Collins
Hello Mark, On 07/02/2018 03:28 AM, Mark Brown wrote: > On Fri, Jun 22, 2018 at 05:46:14PM -0700, David Collins wrote: > >> --- /dev/null >> +++ b/drivers/regulator/qcom-rpmh-regulator.c >> @@ -0,0 +1,746 @@ >> +// SPDX-License-Identifier: GPL-2.0 >> +/* Copy

Re: [PATCH 3/3] arm64: dts: qcom: pm8998: Add thermal zone

2018-07-10 Thread David Collins
Hello Matthias, On 06/29/2018 04:54 PM, Matthias Kaehlcke wrote: > On Fri, Jun 29, 2018 at 02:29:55PM -0700, David Collins wrote: ... >> The PMIC TEMP_ALARM hardware peripheral will perform an automatic partial >> PMIC shutdown upon hitting over-temperature stage 2 (125 C). Th

Re: [PATCH 2/3] arm64: dts: qcom: sdm845-mtp: Add RPMh VRM/XOB regulators

2018-07-10 Thread David Collins
Hello Doug, On 07/10/2018 03:02 PM, Douglas Anderson wrote: ... > + vdd-s1-supply = <&vph_pwr>; > + vdd-s2-supply = <&vph_pwr>; > + vdd-s3-supply = <&vph_pwr>; > + vdd-s4-supply = <&vph_pwr>; > + vdd-s5-supply = <&vph_pwr>; > +

Re: [PATCH 2/3] arm64: dts: qcom: sdm845-mtp: Add RPMh VRM/XOB regulators

2018-07-10 Thread David Collins
Hi, On 07/10/2018 03:55 PM, Doug Anderson wrote: > On Tue, Jul 10, 2018 at 3:32 PM, David Collins > wrote: >> On 07/10/2018 03:02 PM, Douglas Anderson wrote: >> ... >>> + vdd-s1-supply = <&vph_pwr>; >>> + vdd-s2-supply

Re: [PATCH v8 2/2] regulator: add QCOM RPMh regulator driver

2018-06-28 Thread David Collins
Hello Mark, On 06/28/2018 03:18 AM, Mark Brown wrote: > On Wed, Jun 27, 2018 at 09:28:03AM -0700, Doug Anderson wrote: > >> OK, great. I guess I'm confused about the "|| COMPILE_TEST" causing >> problems then? I was worried that anyone trying to do "COMPILE_TEST" >> on your tree (or linuxnext i

Re: [PATCH v2 2/6] dt-bindings: opp: Introduce qcom-opp bindings

2018-05-25 Thread David Collins
Hello Rajendra, On 05/25/2018 03:01 AM, Rajendra Nayak wrote: > On Qualcomm platforms, an OPP node needs to describe an s/Qualcomm/Qualcomm Technologies, Inc./ > additional level/corner value that is then communicated to > a remote microprocessor by the CPU, which then takes some > actions (lik

Re: [PATCH v2 5/6] soc: qcom: rpmh powerdomain driver

2018-05-25 Thread David Collins
Hello Rajendra, On 05/25/2018 03:01 AM, Rajendra Nayak wrote: > The RPMh powerdomain driver aggregates the corner votes from various s/powerdomain/power domain/ This applies to all instances in this patch. "Power domain" seems to be the preferred spelling in the kernel. > consumers for the AR

[PATCH 2/2] regulator: of: add support for allowed modes configuration

2018-05-11 Thread David Collins
Add support for configuring the machine constraints valid_modes_mask element based on a list of allowed modes specified via a device tree property. Signed-off-by: David Collins --- drivers/regulator/of_regulator.c | 29 - 1 file changed, 28 insertions(+), 1 deletion

[PATCH 0/2] regulator: of: add device tree property for allowed modes

2018-05-11 Thread David Collins
use. It also implements parsing for this new property inside of the of_get_regulation_constraints() function. David Collins (2): regulator: of: add property for allowed modes specification regulator: of: add support for allowed modes configuration .../devicetree/bindings/regulator/regulator.

[PATCH 1/2] regulator: of: add property for allowed modes specification

2018-05-11 Thread David Collins
Add a common device tree property for regulator nodes to support the specification of allowed operating modes. Signed-off-by: David Collins --- Documentation/devicetree/bindings/regulator/regulator.txt | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings

[PATCH v3 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-05-11 Thread David Collins
the final PMIC regulator hardware state. Signed-off-by: David Collins --- .../bindings/regulator/qcom,rpmh-regulator.txt | 208 + .../dt-bindings/regulator/qcom,rpmh-regulator.h| 36 2 files changed, 244 insertions(+) create mode 100644 Documentation/devicetree

[PATCH v3 0/2] regulator: add QCOM RPMh regulator driver

2018-05-11 Thread David Collins
rom DT binding documentation [1]: https://lkml.org/lkml/2018/5/9/729 [2]: https://lkml.org/lkml/2018/4/10/714 [3]: https://patchwork.kernel.org/patch/10348629 [4]: https://lkml.org/lkml/2018/5/11/696 [5]: https://lkml.org/lkml/2018/4/13/687 [6]: https://lkml.org/lkml/2018/3/16/1431 David Collins (2):

[PATCH v3 2/2] regulator: add QCOM RPMh regulator driver

2018-05-11 Thread David Collins
enable state, voltage, mode, and headroom voltage. XOB supports manipulation of enable state. Signed-off-by: David Collins --- drivers/regulator/Kconfig | 9 + drivers/regulator/Makefile | 1 + drivers/regulator/qcom-rpmh-regulator.c | 925

Re: [PATCH v2 1/6] soc: qcom: rpmpd: Add a powerdomain driver to model corners

2018-05-30 Thread David Collins
Hello Rajendra, On 05/30/2018 03:14 AM, Rajendra Nayak wrote: > On 05/30/2018 02:47 PM, Ulf Hansson wrote: >> On 25 May 2018 at 12:01, Rajendra Nayak wrote: ... >>> + pm_genpd_init(&rpmpds[i]->pd, NULL, true); >> >> Question: Is there no hierarchical topology of the PM domains. No >

Re: [PATCH v4 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-05-30 Thread David Collins
Hello Mark and Doug, On 05/30/2018 09:24 AM, Doug Anderson wrote: > On Wed, May 30, 2018 at 9:20 AM, Mark Brown wrote: >> On Wed, May 30, 2018 at 09:12:25AM -0700, Doug Anderson wrote: >>> On Wed, May 30, 2018 at 8:50 AM, Mark Brown wrote: >> No, I'm saying that I don't know why that proper

Re: [PATCH v4 2/2] regulator: add QCOM RPMh regulator driver

2018-05-30 Thread David Collins
Hello Doug, On 05/29/2018 10:32 PM, Doug Anderson wrote: > On Tue, May 22, 2018 at 7:43 PM, David Collins > wrote: >> + * @ever_enabled: Boolean indicating that the regulator has >> been >> + * explicitly enabled

Re: [PATCH v4 0/2] regulator: add QCOM RPMh regulator driver

2018-05-30 Thread David Collins
Hello Mark, On 05/30/2018 09:33 AM, Mark Brown wrote: > On Tue, May 22, 2018 at 07:43:16PM -0700, David Collins wrote: >> This patch series adds a driver and device tree binding documentation for >> PMIC regulator control via Resource Power Manager-hardened (RPMh) on some >>

Re: [PATCH v4 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-05-30 Thread David Collins
Hi Doug, On 05/30/2018 05:34 PM, Doug Anderson wrote: > On Wed, May 30, 2018 at 4:39 PM, David Collins > wrote: >> Consider the case of a regulator with physical 10 mA LPM max current. Say >> that modem and application processors each have a load on the regulator >>

Re: [PATCH v2 5/6] soc: qcom: rpmh powerdomain driver

2018-06-01 Thread David Collins
Hello Rajendra, On 06/01/2018 01:48 AM, Rajendra Nayak wrote: > On 05/26/2018 06:38 AM, David Collins wrote: >> >>> + [1] = &sdm845_mx, >>> + [2] = &sdm845_mx_ao, >>> + [3] = &sdm845_cx, >>> + [4] = &sdm845_cx_ao, >

Re: [PATCH v4 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-06-01 Thread David Collins
Hello Mark, On 05/31/2018 04:48 AM, Mark Brown wrote: > On Wed, May 30, 2018 at 04:39:10PM -0700, David Collins wrote: >> The DRMS modes to use and max allowed current per mode need to be >> specified at the board level in device tree instead of hard-coded per >> regulat

[PATCH v5 0/2] regulator: add QCOM RPMh regulator driver

2018-06-01 Thread David Collins
kml.org/lkml/2018/4/10/714 [3]: https://lkml.org/lkml/2018/4/18/556 [4]: https://lkml.org/lkml/2018/5/11/696 [5]: https://lkml.org/lkml/2018/5/15/1005 [6]: https://lkml.org/lkml/2018/5/22/1168 [7]: https://lkml.org/lkml/2018/5/11/701 [8]: https://lkml.org/lkml/2018/4/13/687 [9]: https://lkml

[PATCH v5 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-06-01 Thread David Collins
the final PMIC regulator hardware state. Signed-off-by: David Collins --- .../bindings/regulator/qcom,rpmh-regulator.txt | 160 + .../dt-bindings/regulator/qcom,rpmh-regulator.h| 36 + 2 files changed, 196 insertions(+) create mode 100644 Documentation/devicetree

[PATCH v5 2/2] regulator: add QCOM RPMh regulator driver

2018-06-01 Thread David Collins
enable state, voltage, and mode. XOB supports manipulation of enable state. Signed-off-by: David Collins --- drivers/regulator/Kconfig | 9 + drivers/regulator/Makefile | 1 + drivers/regulator/qcom-rpmh-regulator.c | 770 3 files

Re: [PATCH v3 5/7] dt-bindings: power: Add qcom rpmh power domain driver bindings

2018-06-13 Thread David Collins
Hello Rajendra, On 06/11/2018 09:40 PM, Rajendra Nayak wrote: > Add DT bindings to describe the rpmh powerdomains found on Qualcomm s/powerdomains/power domains/ > Technologies, Inc. SoCs. These power domains communicate a performance > state to RPMh, which then translates it into corresponding

Re: [PATCH v3 7/7] soc: qcom: rpmpd/rpmhpd: Add a max vote on all corners at init

2018-06-13 Thread David Collins
Hello Rajendra, On 06/11/2018 09:40 PM, Rajendra Nayak wrote: > As we move from no clients/consumers in kernel voting on corners, > to *some* voting and some not voting, we might end up in a situation > where the clients which remove votes can adversly impact others s/adversly/adversely/ > who s

Re: [PATCH v3 6/7] soc: qcom: Add RPMh Power domain driver

2018-06-13 Thread David Collins
Hello Rajendra, On 06/11/2018 09:40 PM, Rajendra Nayak wrote: > The RPMh Power domain driver aggregates the corner votes from various > consumers for the ARC resources and communicates it to RPMh. > > We also add data for all power domains on sdm845 SoC as part of the patch. > The driver can be e

Re: [PATCH v3 6/7] soc: qcom: Add RPMh Power domain driver

2018-06-14 Thread David Collins
Hello Rajendra, On 06/13/2018 11:54 PM, Rajendra Nayak wrote: > On 06/14/2018 06:02 AM, David Collins wrote: >> On 06/11/2018 09:40 PM, Rajendra Nayak wrote: ... >>> +static int rpmhpd_power_off(struct generic_pm_domain *domain) >>> +{ >>> + struct

Re: [PATCH v3 6/7] soc: qcom: Add RPMh Power domain driver

2018-06-15 Thread David Collins
Hello Ulf, On 06/15/2018 02:25 AM, Ulf Hansson wrote: > On 14 June 2018 at 20:17, David Collins wrote: >> On 06/13/2018 11:54 PM, Rajendra Nayak wrote: >>> On 06/14/2018 06:02 AM, David Collins wrote: >>>> On 06/11/2018 09:40 PM, Rajendra Nayak wrote: >> ..

Re: [PATCH 1/2] regulator: add QCOM RPMh regulator driver

2018-05-17 Thread David Collins
On 05/16/2018 11:09 PM, Mark Brown wrote: > On Tue, Apr 24, 2018 at 01:46:21PM -0700, David Collins wrote: >> The RPMh hardware is aware of the parent-child connections between >> regulators as well as minimum headroom to ensure stable LDO voltage output >> for subregulated LD

Re: [PATCH v3 2/2] regulator: add QCOM RPMh regulator driver

2018-05-17 Thread David Collins
On 05/17/2018 02:23 PM, Doug Anderson wrote: > On Fri, May 11, 2018 at 7:28 PM, David Collins > wrote: >> + /* >> +* Default the voltage selector to an error value in >> the >> +* case that qcom,

Re: [PATCH v3 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-05-17 Thread David Collins
On 05/17/2018 02:22 PM, Doug Anderson wrote: > On Fri, May 11, 2018 at 7:28 PM, David Collins > wrote: >> +- qcom,regulator-initial-microvolt >> + Usage: optional; VRM regulators only >> + Value type: >> + Definition: Specifies the initial vo

Re: [PATCH 1/4] regulator: core: If consumers don't call regulator_set_load() assume max

2018-08-14 Thread David Collins
Hello Doug, On 08/14/2018 10:06 AM, Douglas Anderson wrote: > Not all regulator consumers call regulator_set_load(). On some > regulators (like on RPMh-regulator) this could be bad since the > regulator framework will treat this as if consumer needs no load. > It's much better to assume that a du

Re: [PATCH 1/4] regulator: core: If consumers don't call regulator_set_load() assume max

2018-08-14 Thread David Collins
Hi, On 08/14/2018 01:03 PM, Doug Anderson wrote: > On Tue, Aug 14, 2018 at 11:30 AM, David Collins > wrote:>>> --- a/drivers/regulator/core.c >>> +++ b/drivers/regulator/core.c >>> @@ -732,6 +732,7 @@ static int drms_uA_update(struct regulator_dev *rdev) &g

Re: [PATCH 1/4] regulator: core: If consumers don't call regulator_set_load() assume max

2018-08-14 Thread David Collins
On 08/14/2018 04:56 PM, Doug Anderson wrote: > On Tue, Aug 14, 2018 at 2:59 PM, David Collins > wrote: >> On 08/14/2018 01:03 PM, Doug Anderson wrote: >>> On Tue, Aug 14, 2018 at 11:30 AM, David Collins >>> wrote:>>> --- a/drivers/regulator/core

Re: [PATCH 1/4] regulator: core: If consumers don't call regulator_set_load() assume max

2018-08-16 Thread David Collins
Hello Doug, On 08/16/2018 01:07 PM, Doug Anderson wrote: > I'll work on either adding more regulator_set_load() calls to clients > or perhaps disabling the "regulator-allow-set-load" for a bunch of > rails. David: presumably if we have a rail that we never need to be > on-and-in-low-power-mode ca

Re: [PATCH v3 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-05-22 Thread David Collins
On 05/22/2018 09:43 AM, Doug Anderson wrote: > On Mon, May 21, 2018 at 5:00 PM, David Collins > wrote: ... >> Returning the cached (but not sent) initial voltage equal to the min >> constraint voltage in get_voltage() calls should not cause any problems. >> This repres

Re: [PATCH v3 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-05-22 Thread David Collins
On 05/22/2018 05:08 PM, Doug Anderson wrote: > On Tue, May 22, 2018 at 3:46 PM, David Collins > wrote: >> On 05/22/2018 09:43 AM, Doug Anderson wrote: >>> On Mon, May 21, 2018 at 5:00 PM, David Collins >>> wrote: ... >> However, if the voltage caching feat

[PATCH v4 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-05-22 Thread David Collins
the final PMIC regulator hardware state. Signed-off-by: David Collins --- .../bindings/regulator/qcom,rpmh-regulator.txt | 185 + .../dt-bindings/regulator/qcom,rpmh-regulator.h| 36 2 files changed, 221 insertions(+) create mode 100644 Documentation/devicetree

[PATCH v4 2/2] regulator: add QCOM RPMh regulator driver

2018-05-22 Thread David Collins
enable state, voltage, and mode. XOB supports manipulation of enable state. Signed-off-by: David Collins --- drivers/regulator/Kconfig | 9 + drivers/regulator/Makefile | 1 + drivers/regulator/qcom-rpmh-regulator.c | 865 3 files

[PATCH v4 0/2] regulator: add QCOM RPMh regulator driver

2018-05-22 Thread David Collins
tps://lkml.org/lkml/2018/4/10/714 [3]: https://lkml.org/lkml/2018/4/18/556 [4]: https://lkml.org/lkml/2018/5/11/696 [5]: https://lkml.org/lkml/2018/5/15/1005 [6]: https://lkml.org/lkml/2018/5/11/701 [7]: https://lkml.org/lkml/2018/4/13/687 [8]: https://lkml.org/lkml/2018/3/16/1431 David Collins (2)

Re: [PATCH 1/2] regulator: add QCOM RPMh regulator driver

2018-03-27 Thread David Collins
On 03/23/2018 01:00 PM, Doug Anderson wrote: > On Thu, Mar 22, 2018 at 3:31 PM, David Collins > wrote: >>>> +static int rpmh_regulator_is_enabled(struct regulator_dev *rdev) >>>> +{ >>>> + struct rpmh_vreg *vreg = rdev_get_drvdata(rdev)

Re: [PATCH 1/2] regulator: add QCOM RPMh regulator driver

2018-03-27 Thread David Collins
On 03/27/2018 04:56 AM, Mark Brown wrote: > On Fri, Mar 23, 2018 at 01:00:47PM -0700, Doug Anderson wrote: >> On Thu, Mar 22, 2018 at 3:31 PM, David Collins >> wrote: > >>> There are two cases that I can think of: 1. Having a set_voltage() >>> callback all

Re: [PATCH 2/2] dt-bindings: regulator: add QCOM RPMh regulator bindings

2018-03-27 Thread David Collins
Hello Mark, On 03/20/2018 07:43 PM, Mark Brown wrote: > On Fri, Mar 16, 2018 at 06:09:11PM -0700, David Collins wrote: >> Introduce bindings for RPMh regulator devices found on some >> Qualcomm Technlogies, Inc. SoCs. These devices allow a given > > Please use subject lin

Re: [PATCH v2 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-05-02 Thread David Collins
On 05/02/2018 09:37 AM, Doug Anderson wrote: > On Fri, Apr 13, 2018 at 7:50 PM, David Collins > wrote: >> +- vdd_l26-supply >> +- vdd_lvs1_lvs2-supply >> +- vdd_lvs1_lvs2-supply >> + Usage: optional (PM8998 only) >> + Value type: >>

Re: [PATCH v2 5/6] soc: qcom: rpmh powerdomain driver

2018-05-29 Thread David Collins
Hello Rajendra, On 05/29/2018 03:19 AM, Rajendra Nayak wrote: > On 05/26/2018 06:38 AM, David Collins wrote: >> On 05/25/2018 03:01 AM, Rajendra Nayak wrote: >>> The RPMh powerdomain driver aggregates the corner votes from various ... >>> diff --git a/drivers/soc/qcom

[PATCH v6 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-06-04 Thread David Collins
the final PMIC regulator hardware state. Signed-off-by: David Collins Reviewed-by: Rob Herring --- .../bindings/regulator/qcom,rpmh-regulator.txt | 160 + .../dt-bindings/regulator/qcom,rpmh-regulator.h| 36 + 2 files changed, 196 insertions(+) create mode 100644

[PATCH v6 2/2] regulator: add QCOM RPMh regulator driver

2018-06-04 Thread David Collins
enable state, voltage, and mode. XOB supports manipulation of enable state. Signed-off-by: David Collins --- drivers/regulator/Kconfig | 9 + drivers/regulator/Makefile | 1 + drivers/regulator/qcom-rpmh-regulator.c | 767 3 files

[PATCH v6 0/2] regulator: add QCOM RPMh regulator driver

2018-06-04 Thread David Collins
ml.org/lkml/2018/5/22/1168 [8]: https://lkml.org/lkml/2018/5/11/701 [9]: https://lkml.org/lkml/2018/4/13/687 [10]: https://lkml.org/lkml/2018/3/16/1431 David Collins (2): regulator: dt-bindings: add QCOM RPMh regulator bindings regulator: add QCOM RPMh regulator driver .../bindings/regulato

Re: [PATCH] regulator: core: Allow for regulators that can't be read at bootup

2018-05-16 Thread David Collins
On 05/15/2018 03:07 PM, Douglas Anderson wrote: > As discussed in the patches to try to support the RPMh regulators [1], > the fact that regulators are write-only means that its driver's > get_voltage_sel() should return an error code if it's called before > any calls to set_voltage_sel(). This ca

Re: [PATCH 1/2] regulator: add QCOM RPMh regulator driver

2018-04-24 Thread David Collins
>> + ret = cmd_db_ready(); >> + if (ret < 0) { >> + if (ret != -EPROBE_DEFER) >> + dev_err(dev, "Command DB not available, >> ret=%d\n", ret); >> + return ret; >> + } > > We should just make rpmh

Re: [PATCH 1/2] regulator: add QCOM RPMh regulator driver

2018-04-24 Thread David Collins
On 04/24/2018 10:41 AM, Mark Brown wrote: > On Fri, Apr 20, 2018 at 12:28:21PM -0700, David Collins wrote: >> RPMh hardware enforces the requested minimum headroom voltage for all >> regulators with a parent. It has full knowledge of the parent-child >> connections of regula

Re: [PATCH v2 2/2] regulator: add QCOM RPMh regulator driver

2018-04-24 Thread David Collins
On 04/24/2018 10:45 AM, Mark Brown wrote: >>> You'd need to ask Mark if he's OK with it, but a option #3 is to add a >>> patch to your series fix the regulator framework to try setting the >>> voltage if _regulator_get_voltage() fails. Presumably in >>> machine_constraints_voltage() you'd now do s

Re: [PATCH v2 2/2] regulator: add QCOM RPMh regulator driver

2018-04-25 Thread David Collins
>>> I think that's probably only OK if we have a specific error code for the >>> regulator being limited in this way otherwise our error handling for I/O >>> problems involves us trying to reconfigure supplies which seems like it >>> would be risky. >> Would you be ok with -EAGAIN being used for

[PATCH] regulator: core: avoid regulator_resolve_supply() race condition

2021-01-07 Thread David Collins
h parent '17a0.rsc:rpmh-regulator-gfxlvl-pm8350_s5_level' already present! Avoid this race condition by holding the rdev->mutex lock inside of regulator_resolve_supply() while checking and setting rdev->supply. Signed-off-by:

Re: [PATCH] regulator: core: avoid regulator_resolve_supply() race condition

2021-01-22 Thread David Collins
Hello Mark, On 1/21/21 12:30 PM, Marek Szyprowski wrote: Hi Mark, On 21.01.2021 16:44, Mark Brown wrote: On Thu, Jan 21, 2021 at 10:41:59AM +0100, Marek Szyprowski wrote: On 18.01.2021 21:49, Mark Brown wrote: Does this help (completely untested): Sadly nope. I get same warning: Try this i

Re: [PATCH v3 1/4] mfd: pm8xxx-spmi: add support for Qualcomm SPMI PMICs

2014-07-29 Thread David Collins
is needed. In that case, the PMIC specific compatible string could be added to the list along with whatever special function is needed to handle it. Take care, David Collins [1]: https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.10/tree/arch/arm/boot/dts/qcom?h=msm-3.10 [2]: https://lkml.

Re: [PATCH v3 2/4] mfd: pm8xxx-spmi: document DT bindings for Qualcomm SPMI PMICs

2014-07-29 Thread David Collins
interrupt-names = "alarm"; > + }; > + }; Can you please expand your example to include the second SID for the PM8941 chip? That way, it will be clear that each PMIC needs two DT nodes; one for each SID. Thanks, David Collins [1]: https://www.codeaurora.org/cgit

Re: [PATCH v3 1/4] mfd: pm8xxx-spmi: add support for Qualcomm SPMI PMICs

2014-07-31 Thread David Collins
On 07/31/2014 01:48 AM, Stanimir Varbanov wrote: > Hi David, > > Thanks for the comments! > > On 07/30/2014 12:54 AM, David Collins wrote: >> On 07/24/2014 05:45 AM, Stanimir Varbanov wrote: >>> From: Josh Cartwright >>> >>> The Qualc

Re: [PATCH v3 2/4] mfd: pm8xxx-spmi: document DT bindings for Qualcomm SPMI PMICs

2014-07-31 Thread David Collins
On 07/31/2014 01:58 AM, Stanimir Varbanov wrote: > On 07/30/2014 01:23 AM, David Collins wrote: >> On 07/24/2014 05:45 AM, Stanimir Varbanov wrote: >>> Document DT bindings used to describe the Qualcomm SPMI PMICs. >>> Currently the SPMI PMICs supported are

Re: [PATCH 1/2] mfd: pm8x41: add support for Qualcomm 8x41 PMICs

2014-04-25 Thread David Collins
l Public License for more details. >>> + */ >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> + >>> +static const struct regmap_config pm8x41_regmap_config = { >>> + .reg_bits = 16, >

Re: [PATCH v2 2/4] pinctrl: qpnp: Qualcomm PMIC pin controller driver

2014-07-25 Thread David Collins
cells < 2\n"); return -EINVAL; } - pad = qpnp_get_desc(qctrl, gpio_desc->args[0]); + pad = qpnp_get_desc(qctrl, pin); if (!pad) return -EINVAL; if (flags) *flags = gpio_desc->args[1]; - return gpio_d

Re: [PATCH v3 0/4] Solve postboot supplier cleanup and optimize probe ordering

2019-07-02 Thread David Collins
Hello Saravana, On 7/1/19 5:48 PM, Saravana Kannan wrote: ... > TODO: > - For the case of consumer child sub-nodes being added by a parent > device after late_initcall_sync we might be able to address that by > recursively parsing all child nodes and adding all their suppliers as > suppliers

Re: [PATCH v2 2/3] of/platform: Add functional dependency link from DT bindings

2019-06-28 Thread David Collins
Hello Saravana, On 6/27/19 7:22 PM, Saravana Kannan wrote: > diff --git a/drivers/of/platform.c b/drivers/of/platform.c > index 04ad312fd85b..8d690fa0f47c 100644 > --- a/drivers/of/platform.c > +++ b/drivers/of/platform.c > @@ -61,6 +61,72 @@ struct platform_device *of_find_device_by_node(struct

Re: [PATCH v6 2/2] regulator: add QCOM RPMh regulator driver

2018-06-08 Thread David Collins
Hello Matthias, On 06/07/2018 05:26 PM, Matthias Kaehlcke wrote: > On Mon, Jun 04, 2018 at 12:15:12PM -0700, David Collins wrote: >> static int rpmh_regulator_send_request(struct rpmh_vreg *vreg, >> + struct tcs_cmd *cmd, int count, bool wait_for_ack) >>

[PATCH v7 2/2] regulator: add QCOM RPMh regulator driver

2018-06-08 Thread David Collins
enable state, voltage, and mode. XOB supports manipulation of enable state. Signed-off-by: David Collins Reviewed-by: Douglas Anderson --- drivers/regulator/Kconfig | 9 + drivers/regulator/Makefile | 1 + drivers/regulator/qcom-rpmh-regulator.c | 753

[PATCH v7 0/2] regulator: add QCOM RPMh regulator driver

2018-06-08 Thread David Collins
kml/2018/5/11/696 [5]: https://lkml.org/lkml/2018/5/15/1005 [6]: https://lkml.org/lkml/2018/6/4/879 [7]: https://lkml.org/lkml/2018/6/1/895 [8]: https://lkml.org/lkml/2018/5/22/1168 [9]: https://lkml.org/lkml/2018/5/11/701 [10]: https://lkml.org/lkml/2018/4/13/687 [11]: https://lkml.org/lkml/2018/3/16/1431

[PATCH v7 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-06-08 Thread David Collins
the final PMIC regulator hardware state. Signed-off-by: David Collins Reviewed-by: Rob Herring Reviewed-by: Douglas Anderson --- .../bindings/regulator/qcom,rpmh-regulator.txt | 160 + .../dt-bindings/regulator/qcom,rpmh-regulator.h| 36 + 2 files changed, 196

Re: [PATCH v3 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-05-18 Thread David Collins
On 05/17/2018 06:01 PM, Doug Anderson wrote: > On Thu, May 17, 2018 at 5:16 PM, David Collins > wrote: >> On 05/17/2018 02:22 PM, Doug Anderson wrote: >>> On Fri, May 11, 2018 at 7:28 PM, David Collins >>> wrote: >>>> +- qcom,regulator-initial-microv

Re: [PATCH v3 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-05-21 Thread David Collins
On 05/21/2018 11:01 AM, Doug Anderson wrote: > On Fri, May 18, 2018 at 5:46 PM, David Collins > wrote: ... >> Something to keep in mind about the downstream rpmh-regulator driver is >> that it caches the initial voltages specified in device tree and only >> sends them

[PATCH 0/2] regulator: add QCOM RPMh regulator driver

2018-03-16 Thread David Collins
] which are both still undergoing review. Thanks, David [1]: https://lkml.org/lkml/2018/3/9/979 [2]: https://lkml.org/lkml/2018/3/14/787 David Collins (2): regulator: add QCOM RPMh regulator driver dt-bindings: regulator: add QCOM RPMh regulator bindings .../bindings/regulator/qcom,rpmh

[PATCH 2/2] dt-bindings: regulator: add QCOM RPMh regulator bindings

2018-03-16 Thread David Collins
the final PMIC regulator hardware state. Signed-off-by: David Collins --- .../bindings/regulator/qcom,rpmh-regulator.txt | 246 + 1 file changed, 246 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.txt diff --git a

[PATCH 1/2] regulator: add QCOM RPMh regulator driver

2018-03-16 Thread David Collins
enable state, voltage, mode, and headroom voltage. XOB supports manipulation of enable state. Signed-off-by: David Collins --- drivers/regulator/Kconfig |9 + drivers/regulator/Makefile |1 + drivers/regulator/qcom_rpmh-regulator.c

Re: [PATCH 1/2] regulator: add QCOM RPMh regulator driver

2018-04-20 Thread David Collins
On 04/18/2018 10:55 PM, Stephen Boyd wrote: > Quoting David Collins (2018-03-22 18:30:06) >> On 03/21/2018 12:07 PM, Stephen Boyd wrote: >>> Quoting David Collins (2018-03-16 18:09:10) >>>> diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig >

Re: [PATCH 1/2] regulator: add QCOM RPMh regulator driver

2018-04-20 Thread David Collins
On 04/19/2018 05:08 AM, Mark Brown wrote: > On Wed, Apr 18, 2018 at 10:55:49PM -0700, Stephen Boyd wrote: Is this regulator-microvolt-offset? Ah I guess it's a thing in the RPMh registers. This probably needs to be pushed into the framework and come down through a 'set_headroom' op i

Re: [PATCH v2 2/2] regulator: add QCOM RPMh regulator driver

2018-04-20 Thread David Collins
On 04/19/2018 09:16 AM, Doug Anderson wrote: > On Wed, Apr 18, 2018 at 4:30 PM, David Collins > wrote: >>>> + * @drms_mode: Array of regulator framework modes which >>>> can >>>> + * be confi

[PATCH v2 2/2] regulator: add QCOM RPMh regulator driver

2018-04-13 Thread David Collins
enable state, voltage, mode, and headroom voltage. XOB supports manipulation of enable state. Signed-off-by: David Collins --- drivers/regulator/Kconfig | 9 + drivers/regulator/Makefile | 1 + drivers/regulator/qcom_rpmh-regulator.c | 910

[PATCH v2 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-04-13 Thread David Collins
the final PMIC regulator hardware state. Signed-off-by: David Collins --- .../bindings/regulator/qcom,rpmh-regulator.txt | 207 + .../dt-bindings/regulator/qcom,rpmh-regulator.h| 36 2 files changed, 243 insertions(+) create mode 100644 Documentation/devicetree

[PATCH v2 0/2] regulator: add QCOM RPMh regulator driver

2018-04-13 Thread David Collins
- Moved header into DT patch - Removed redundant property listings from DT binding documentation Thanks, David [1]: https://lkml.org/lkml/2018/4/5/480 [2]: https://lkml.org/lkml/2018/4/10/714 [3]: https://lkml.org/lkml/2018/3/16/1431 David Collins (2): regulator: dt-bindings: add QCOM RPMh

Re: [PATCH v3 2/2] clk: qcom: clk-rpmh: Add QCOM RPMh clock driver

2018-04-16 Thread David Collins
Hello Taniya, On 04/16/2018 10:38 AM, Stephen Boyd wrote: > Quoting Taniya Das (2018-04-13 19:36:41) >> Add the RPMh clock driver to control the RPMh managed clock resources on >> some of the Qualcomm Technologies, Inc. SoCs. >> >> Signed-off-by: David Collins >

Re: [PATCH v2 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-04-16 Thread David Collins
Hello Rob, On 04/16/2018 01:57 PM, Rob Herring wrote: > On Fri, Apr 13, 2018 at 07:50:34PM -0700, David Collins wrote: >> Introduce bindings for RPMh regulator devices found on some >> Qualcomm Technlogies, Inc. SoCs. These devices allow a given >> processor within the SoC t

Re: [v2,2/2] regulator: add QCOM RPMh regulator driver

2018-04-17 Thread David Collins
On 04/17/2018 11:23 AM, Matthias Kaehlcke wrote: > On Fri, Apr 13, 2018 at 07:50:35PM -0700, David Collins wrote: >> Add the QCOM RPMh regulator driver to manage PMIC regulators >> which are controlled via RPMh on some Qualcomm Technologies, Inc. >> SoCs. RPMh is a hardware

Re: [v2,2/2] regulator: add QCOM RPMh regulator driver

2018-04-18 Thread David Collins
On 04/17/2018 12:47 PM, Matthias Kaehlcke wrote: > On Tue, Apr 17, 2018 at 12:15:18PM -0700, David Collins wrote: >> On 04/17/2018 11:23 AM, Matthias Kaehlcke wrote: >>> On Fri, Apr 13, 2018 at 07:50:35PM -0700, David Collins wrote: >>>> [...] >>>>

Re: [PATCH v2 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings

2018-04-18 Thread David Collins
On 04/17/2018 01:06 PM, Doug Anderson wrote: > [...] >> +- qcom,regulator-initial-voltage > > nit: regulator framework tends to include "microvolt" in the name to > make it really obvious in the device tree what the units are. Can you > do that too? Sure, I'll change the name to be: qcom,regulat

Re: [PATCH v2 2/2] regulator: add QCOM RPMh regulator driver

2018-04-18 Thread David Collins
On 04/17/2018 01:02 PM, Doug Anderson wrote: > On Fri, Apr 13, 2018 at 7:50 PM, David Collins > wrote: >> +#define RPMH_REGULATOR_DISABLE 0x0 >> +#define RPMH_REGULATOR_ENABLE 0x1 > > In the last version Stephen said he didn't like

Re: [RESEND PATCH] spmi: prefix spmi bus device names with "spmi"

2020-10-01 Thread David Collins
On 10/1/20 11:51 AM, Stephen Boyd wrote: > Quoting Mark Brown (2020-10-01 10:43:26) >> On Wed, Sep 30, 2020 at 05:07:20PM -0700, Stephen Boyd wrote: >>> Quoting David Collins (2020-09-22 15:04:18) >> >>>> This helps to disambiguate SPMI device regmaps from I2C o

  1   2   >