Re: [PATCH v2 1/2] power: supply: sbs-battery: don't assume MANUFACTURER_DATA formats

2018-06-01 Thread Rhyland Klein
look asymmetric). > I suppose I could pull the 'return 0' out, but I'm not sure that would > make the code any better. I generally prefer to make checkpatch happy, so I would vote to move the return outside of the if blocks as a minimal way of making it happy. In general though, Acked-by: Rhyland Klein > >> Other than that >> >> Reviewed-by: Guenter Roeck >> >>> + /* SBS spec doesn't have a general health command. */ >>> + val->intval = POWER_SUPPLY_HEALTH_UNKNOWN; >>> + return 0; >>> + } >>> +} >>> + > > Brian > -- nvpublic

Re: [PATCH 2/2] dt-bindings: power: sbs-battery: re-document "ti,bq20z75"

2018-06-01 Thread Rhyland Klein
this property as an alternative to "sbs,sbs-battery", and > because we've noticed there are some lingering TI specifics (in the > manufacturer-specific portion of the SBS spec), we'd like to start using > this property again to differentiate. > > Cc: Rhyland Klein

Re: [PATCH] mfd: tps65911-comparator: Fix a build error

2018-04-23 Thread Rhyland Klein
On 4/20/2018 5:21 AM, Dan Carpenter wrote: > In 2012, we changed the tps65910 API and fixed most drivers but forgot > to update this one. > > Fixes: 3f7e82759c69 ("mfd: Commonize tps65910 regmap access through header") > Signed-off-by: Dan Carpenter > L

Re: [PATCH v2 01/11] clk: tegra: Switch to using critical clks

2016-07-05 Thread Rhyland Klein
On 6/22/2016 8:16 AM, Thierry Reding wrote: > * PGP Signed by an unknown key > > On Fri, May 27, 2016 at 04:38:04PM -0400, Rhyland Klein wrote: >> Mark some of the required-to-be-enabled clks as critical clks. These >> need to be kept on through the disabling of unused clks

Re: [RESEND PATCH] thermal: helpers: Check return value of get_temp

2016-07-05 Thread Rhyland Klein
On 6/6/2016 12:53 PM, Rhyland Klein wrote: > Check the return value of get_temp, which can fail. If it does, then > unlock and return the error code. > > Signed-off-by: Rhyland Klein > --- > drivers/thermal/thermal_helpers.c | 4 > 1 file changed, 4 insertions(+) >

Re: [PATCH v2 10/11] clk: Show CRITICAL clks in clk_summary output

2016-06-30 Thread Rhyland Klein
On 6/28/2016 1:40 PM, Stephen Boyd wrote: > On 06/22, Rhyland Klein wrote: >> On 6/22/2016 8:24 AM, Thierry Reding wrote: >>> >>> Maybe output " " instead of "" for CLK_IS_CRITICAL, that way you can >>> omit the second conditional. >>&g

Re: [PATCH v5] clk: tegra: Initialize UTMIPLL when enabling PLLU

2016-06-30 Thread Rhyland Klein
On 6/30/2016 11:37 AM, Thierry Reding wrote: > * PGP Signed by an unknown key > > On Thu, Jun 30, 2016 at 11:32:14AM -0400, Rhyland Klein wrote: >> On 6/17/2016 11:23 AM, Thierry Reding wrote: >>>> Old Signed by an unknown key >>> >>> On Fri, Jun 1

Re: [PATCH v5] clk: tegra: Initialize UTMIPLL when enabling PLLU

2016-06-30 Thread Rhyland Klein
On 6/17/2016 11:23 AM, Thierry Reding wrote: > * PGP Signed by an unknown key > > On Fri, Jun 17, 2016 at 02:49:41PM +0100, Jon Hunter wrote: >> Hi Thierry, >> >> On 26/05/16 17:41, Rhyland Klein wrote: >>> From: Andrew Bresticker >>> >>>

[RESEND PATCH] arm64: defconfig: Enable cros-ec and battery driver

2016-06-29 Thread Rhyland Klein
Enable the ChromeOS Embedded Controller, its I2C tunnel driver, and the BA27XXX battery driver. These are all used on the Tegra210 Smaug platform. Signed-off-by: Rhyland Klein --- Resending as the issue with power_supply_core/bq27xxx_battery has been resolved. arch/arm64/configs/defconfig | 4

[PATCH v3] ARM64: boot: dts: Add regulators for Tegra210 Smaug

2016-06-28 Thread Rhyland Klein
Add regulators to the Tegra210 Smaug DTS file including support for the max77620 PMIC. Signed-off-by: Rhyland Klein --- v3: - Fixed up ramp delays - s/maxim,enable-sleep/maxim,device-state-on-disabled-event/ - remove GPIO 3 from pp3300 v2: - Updated reg properties to match current binding

Re: [PATCH v4] power_supply: power_supply_read_temp only if use_cnt > 0

2016-06-28 Thread Rhyland Klein
On 6/28/2016 2:20 PM, Sebastian Reichel wrote: > * PGP Signed by an unknown key > > Hi, > > On Thu, Jun 23, 2016 at 01:43:47PM -0400, Rhyland Klein wrote: >> On 6/22/2016 10:23 AM, Sebastian Reichel wrote: >> Is this also going to go into linux-next? > > https:/

RE: [PATCH v5] clk: tegra: Initialize UTMIPLL when enabling PLLU

2016-06-27 Thread Rhyland Klein
Jonathan, can you confirm replacing usleep_range(100, 200) with udelay(2) works for you? -rhyland -Original Message- From: Thierry Reding [mailto:thierry.red...@gmail.com] Sent: Friday, June 17, 2016 11:24 AM To: Jonathan Hunter Cc: Rhyland Klein; Peter De Schrijver; Mike Turquette

Re: [PATCH v4] power_supply: power_supply_read_temp only if use_cnt > 0

2016-06-23 Thread Rhyland Klein
On 6/22/2016 10:23 AM, Sebastian Reichel wrote: > * PGP Signed by an unknown key > > Hi Rhyland, > > On Tue, Jun 21, 2016 at 02:06:55PM -0400, Rhyland Klein wrote: >> Sebastian, might this be accepted soon? We can't enable the bq27xxx >> driver for Tegra210 Smau

Re: [RESEND PATCH] thermal: helpers: Check return value of get_temp

2016-06-23 Thread Rhyland Klein
On 6/6/2016 12:53 PM, Rhyland Klein wrote: > Check the return value of get_temp, which can fail. If it does, then > unlock and return the error code. > > Signed-off-by: Rhyland Klein > --- > drivers/thermal/thermal_helpers.c | 4 > 1 file changed, 4 insertions(+) >

[PATCH v3] power_supply: fix return value of get_property

2016-06-22 Thread Rhyland Klein
o the power_supply struct to simply show if registration is completed. Lastly, modify the check in power_supply_show_property() to also ignore -EAGAIN when so it doesn't complain about not returning the property. Signed-off-by: Rhyland Klein --- v3: - Moved psy->initialized after atomic

Re: [PATCH v4] power_supply: power_supply_read_temp only if use_cnt > 0

2016-06-22 Thread Rhyland Klein
On 6/22/2016 10:23 AM, Sebastian Reichel wrote: > * PGP Signed by an unknown key > > Hi Rhyland, > > On Tue, Jun 21, 2016 at 02:06:55PM -0400, Rhyland Klein wrote: >> Sebastian, might this be accepted soon? We can't enable the bq27xxx >> driver for Tegra210 Smau

Re: [PATCH v2 10/11] clk: Show CRITICAL clks in clk_summary output

2016-06-22 Thread Rhyland Klein
On 6/22/2016 8:24 AM, Thierry Reding wrote: > * PGP Signed by an unknown key > > On Fri, May 27, 2016 at 04:38:13PM -0400, Rhyland Klein wrote: >> Add a '^' character to the beginning of clk entries that are for >> CRITICAL clks. >> >> Signed-off-by:

Re: [PATCH v2] power_supply: fix return value of get_property

2016-06-21 Thread Rhyland Klein
On 6/16/2016 11:40 AM, Rhyland Klein wrote: > On 6/16/2016 4:43 AM, Krzysztof Kozlowski wrote: >> On 06/16/2016 12:13 AM, Rhyland Klein wrote: >>> power_supply_get_property() should ideally return -EAGAIN if it is >>> called while the power_supply is being r

Re: [PATCH v4] power_supply: power_supply_read_temp only if use_cnt > 0

2016-06-21 Thread Rhyland Klein
On 6/9/2016 5:28 PM, Rhyland Klein wrote: > Change power_supply_read_temp() to use power_supply_get_property() > so that it will check the use_cnt and ensure it is > 0. The use_cnt > will be incremented at the end of __power_supply_register, so this > will block to case where get_

Re: [PATCH v2 00/11] Switch to using CRITICAL clks for Tegra

2016-06-21 Thread Rhyland Klein
On 5/27/2016 4:38 PM, Rhyland Klein wrote: > Switch to defining clks that need to be on as CRITICAL rather than > using the init_tables defined to enable clks. Some of these may be > able to be converted to HAND_OFF clks, when that is supported. > > I added a patch to mark CRITI

Re: [PATCH v5] clk: tegra: Initialize UTMIPLL when enabling PLLU

2016-06-20 Thread Rhyland Klein
On 6/17/2016 11:23 AM, Thierry Reding wrote: > * PGP Signed by an unknown key > > On Fri, Jun 17, 2016 at 02:49:41PM +0100, Jon Hunter wrote: >> Hi Thierry, >> >> On 26/05/16 17:41, Rhyland Klein wrote: >>> From: Andrew Bresticker >>> >>>

Re: [PATCH v2] power_supply: fix return value of get_property

2016-06-16 Thread Rhyland Klein
On 6/16/2016 4:43 AM, Krzysztof Kozlowski wrote: > On 06/16/2016 12:13 AM, Rhyland Klein wrote: >> power_supply_get_property() should ideally return -EAGAIN if it is >> called while the power_supply is being registered. There was no way >> previously to determine if use_cn

[PATCH v2] power_supply: fix return value of get_property

2016-06-15 Thread Rhyland Klein
o the power_supply struct to simply show if registration is completed. Lastly, modify the check in power_supply_show_property() to also ignore -EAGAIN when so it doesn't complain about not returning the property. Signed-off-by: Rhyland Klein --- v2: - Modify power_supply_show_property() to no

Re: [PATCH v4] power_supply: power_supply_read_temp only if use_cnt > 0

2016-06-14 Thread Rhyland Klein
On 6/10/2016 5:43 AM, Krzysztof Kozlowski wrote: > On 06/09/2016 11:28 PM, Rhyland Klein wrote: >> Change power_supply_read_temp() to use power_supply_get_property() >> so that it will check the use_cnt and ensure it is > 0. The use_cnt >> will be incremented at the end of

Re: [PATCH] mfd: max77620: Fix FPS switch statements

2016-06-14 Thread Rhyland Klein
On 6/7/2016 4:05 AM, Lee Jones wrote: > On Thu, 12 May 2016, Rhyland Klein wrote: > >> When configuring FPS during probe, assuming a DT node is present for >> FPS, the code can run into a problem with the switch statements in >> max77620_config_fps() and max77620_

[PATCH] power_supply: fix return value of get_property

2016-06-13 Thread Rhyland Klein
o the power_supply struct to simply show if registration is completed. Signed-off-by: Rhyland Klein --- This patch continues what was discussed with the patch "power_supply: power_supply_read_temp only if use_cnt > 0". Looking at the thermal code, it looks like we should indeed return

[PATCH v4] power_supply: power_supply_read_temp only if use_cnt > 0

2016-06-09 Thread Rhyland Klein
AIN from -ENODEV if use_cnt <= 0. Fixes: 297d716f6260 ("power_supply: Change ownership from driver to core") Cc: sta...@vger.kernel.org Signed-off-by: Rhyland Klein --- v4: - Fixed return check conditions - Removed change to power_supply_get_property return code - removed white

[PATCH v2] ARM64: boot: dts: Add regulators for Tegra210 Smaug

2016-06-09 Thread Rhyland Klein
Add regulators to the Tegra210 Smaug DTS file including support for the max77620 PMIC. Signed-off-by: Rhyland Klein --- v2: - Updated reg properties to match current binding arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 323 ++ 1 file changed, 323 insertions(+) diff

Re: [PATCH v3] power_supply: power_supply_read_temp only if use_cnt > 0

2016-06-09 Thread Rhyland Klein
On 6/9/2016 6:05 AM, Krzysztof Kozlowski wrote: > On 06/08/2016 05:26 PM, Rhyland Klein wrote: >> On 6/8/2016 2:35 AM, Krzysztof Kozlowski wrote: >>> On 06/07/2016 10:26 PM, Rhyland Klein wrote: >>>> Change power_supply_read_temp() to use power_supply_get_property()

Re: [PATCH v3] power_supply: power_supply_read_temp only if use_cnt > 0

2016-06-08 Thread Rhyland Klein
On 6/8/2016 2:35 AM, Krzysztof Kozlowski wrote: > On 06/07/2016 10:26 PM, Rhyland Klein wrote: >> Change power_supply_read_temp() to use power_supply_get_property() >> so that it will check the use_cnt and ensure it is > 0. The use_cnt >> will be incremented at the end of

[PATCH v3] power_supply: power_supply_read_temp only if use_cnt > 0

2016-06-07 Thread Rhyland Klein
AIN from -ENODEV if use_cnt <= 0. Fixes: 297d716f6260 ("power_supply: Change ownership from driver to core") Cc: sta...@vger.kernel.org Signed-off-by: Rhyland Klein --- v3: - Changed calls to ->get_property() to use common power_supply_get_property() - reworded description,

Re: [RESEND PATCH v2] power_supply: power_supply_read_temp only if use_cnt > 0

2016-06-07 Thread Rhyland Klein
On 6/7/2016 3:23 AM, Krzysztof Kozlowski wrote: > On 06/06/2016 06:56 PM, Rhyland Klein wrote: >> Add check to power_supply_read_temp() to only use the power_supply >> get_property() callback if the use_cnt is > 0. The use_cnt will >> be incremented at the end of __power_

Re: [PATCH] ARM64: boot: dts: Add regulators for Tegra210 Smaug

2016-06-06 Thread Rhyland Klein
On 6/6/2016 2:39 AM, Laxman Dewangan wrote: > > On Saturday 04 June 2016 01:52 AM, Rhyland Klein wrote: >> + >> +max77620_default: pinmux@0 { >> +pin_gpio { >> +pins = "g

[RESEND PATCH v2] power_supply: power_supply_read_temp only if use_cnt > 0

2016-06-06 Thread Rhyland Klein
886] kernel_init_freeable+0x148/0x1ec [1.566972] kernel_init+0x10/0xfc [1.572101] ret_from_fork+0x10/0x40 Cc: sta...@vger.kernel.org Signed-off-by: Rhyland Klein --- v2: - Added cc stable - changed return to -EAGAIN in case of use_cnt < 1 - Removed WARNING - return value check ad

[PATCH] power_supply: power_supply_read_temp only if use_cnt > 0

2016-06-06 Thread Rhyland Klein
886] kernel_init_freeable+0x148/0x1ec [1.566972] kernel_init+0x10/0xfc [1.572101] ret_from_fork+0x10/0x40 Cc: sta...@vger.kernel.org Signed-off-by: Rhyland Klein --- v2: - Added cc stable - changed return to -EAGAIN in case of use_cnt < 1 - Removed WARNING - return value check ad

[RESEND PATCH] thermal: helpers: Check return value of get_temp

2016-06-06 Thread Rhyland Klein
Check the return value of get_temp, which can fail. If it does, then unlock and return the error code. Signed-off-by: Rhyland Klein --- drivers/thermal/thermal_helpers.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/thermal/thermal_helpers.c b/drivers/thermal

[PATCH 1/2] thermal: helpers: Check return value of get_temp

2016-06-06 Thread Rhyland Klein
Check the return value of get_temp, which can fail. If it does, then unlock and return the error code. Signed-off-by: Rhyland Klein --- drivers/thermal/thermal_helpers.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/thermal/thermal_helpers.c b/drivers/thermal

Re: [PATCH] power_supply: power_supply_read_temp only if use_cnt > 0

2016-06-06 Thread Rhyland Klein
On 6/4/2016 9:30 AM, Sebastian Reichel wrote: > * PGP Signed by an unknown key > > Hi Rhyland, > > Thanks for the patch. > > On Fri, Jun 03, 2016 at 04:30:50PM -0400, Rhyland Klein wrote: >> Add check to power_supply_read_temp() to only use the power_supply >&g

[PATCH] power_supply: power_supply_read_temp only if use_cnt > 0

2016-06-03 Thread Rhyland Klein
886] kernel_init_freeable+0x148/0x1ec [1.566972] kernel_init+0x10/0xfc [1.572101] ret_from_fork+0x10/0x40 Signed-off-by: Rhyland Klein --- drivers/power/power_supply_core.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/power/power_supply_core.c b/driv

[PATCH] ARM64: boot: dts: Add regulators for Tegra210 Smaug

2016-06-03 Thread Rhyland Klein
Add regulators to the Tegra210 Smaug DTS file including support for the max77620 PMIC. Signed-off-by: Rhyland Klein --- arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 350 ++ 1 file changed, 350 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts

Re: [PATCH] mfd: max77620: Fix FPS switch statements

2016-06-01 Thread Rhyland Klein
On 5/31/2016 3:30 AM, Lee Jones wrote: > On Fri, 27 May 2016, Rhyland Klein wrote: > >> On 5/12/2016 1:52 PM, Laxman Dewangan wrote: >>> >>> On Thursday 12 May 2016 11:15 PM, Rhyland Klein wrote: >>>> When configuring FPS during probe, assuming a DT node

[PATCH v2 04/11] clk: tegra30: Mark certain clks as critical

2016-05-27 Thread Rhyland Klein
Mark the required clks as critical so the core will enable them during registration and therefore they will stay on. Signed-off-by: Rhyland Klein --- drivers/clk/tegra/clk-tegra30.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/clk/tegra/clk-tegra30

[PATCH v2 03/11] clk: tegra20: clean up init_table

2016-05-27 Thread Rhyland Klein
Remove entries from the init_table where the clks are now defined as CRITICAL clks, if we were only enabling them in the init_table. Remove the flag to signal to enable CRITICAL clks if they are still needed in the init_table to set other properties. Signed-off-by: Rhyland Klein --- drivers

[PATCH v2 01/11] clk: tegra: Switch to using critical clks

2016-05-27 Thread Rhyland Klein
Mark some of the required-to-be-enabled clks as critical clks. These need to be kept on through the disabling of unused clks during init. They may not get any reference before or after init, but are required to be on, therefore let the core enable them. Signed-off-by: Rhyland Klein --- v2

[PATCH v2 05/11] clk: tegra30: clean up init_table

2016-05-27 Thread Rhyland Klein
Remove entries from the init_table where the clks are now defined as CRITICAL clks, if we were only enabling them in the init_table. Remove the flag to signal to enable CRITICAL clks if they are still needed in the init_table to set other properties. Signed-off-by: Rhyland Klein --- drivers

[PATCH v2 08/11] clk: tegra210: Mark required clks as CRITICAL

2016-05-27 Thread Rhyland Klein
Mark clks that are required to be on as CRITICAL clks. Signed-off-by: Rhyland Klein --- drivers/clk/tegra/clk-tegra210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/tegra/clk-tegra210.c b/drivers/clk/tegra/clk-tegra210.c index b8551813ec43..156dc8ec6bf6

[PATCH v2 09/11] clk: tegra210: clean up init_table

2016-05-27 Thread Rhyland Klein
Remove entries from the init_table where the clks are now defined as CRITICAL clks, if we were only enabling them in the init_table. Remove the flag to signal to enable CRITICAL clks if they are still needed in the init_table to set other properties. Signed-off-by: Rhyland Klein --- drivers

[PATCH v2 06/11] clk: tegra114: clean up init_table

2016-05-27 Thread Rhyland Klein
Remove entries from the init_table where the clks are now defined as CRITICAL clks, if we were only enabling them in the init_table. Remove the flag to signal to enable CRITICAL clks if they are still needed in the init_table to set other properties. Signed-off-by: Rhyland Klein --- drivers

[PATCH v2 10/11] clk: Show CRITICAL clks in clk_summary output

2016-05-27 Thread Rhyland Klein
Add a '^' character to the beginning of clk entries that are for CRITICAL clks. Signed-off-by: Rhyland Klein --- drivers/clk/clk.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 874c7dd8ef66..22dd0ca1e491 10

[PATCH v2 02/11] clk: tegra20: Mark required clks as CRITICAL

2016-05-27 Thread Rhyland Klein
Mark clks that are required to be on as CRITICAL clks. Signed-off-by: Rhyland Klein --- drivers/clk/tegra/clk-tegra20.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c index 837e5cbd60e9

[PATCH v2 11/11] clk: tegra: WARN if clk in the init_table has enable

2016-05-27 Thread Rhyland Klein
Enabling clocks through the init_table mechanism is deprecated. Clocks that need to be enabled early and stay on should be marked as CRITICAL. Signed-off-by: Rhyland Klein --- drivers/clk/tegra/clk.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/clk/tegra/clk.c b/drivers/clk

[PATCH v2 07/11] clk: tegra124: clean up init_table

2016-05-27 Thread Rhyland Klein
Remove entries from the init_table where the clks are now defined as CRITICAL clks, if we were only enabling them in the init_table. Remove the flag to signal to enable CRITICAL clks if they are still needed in the init_table to set other properties. Signed-off-by: Rhyland Klein --- drivers

[PATCH v2 00/11] Switch to using CRITICAL clks for Tegra

2016-05-27 Thread Rhyland Klein
able to easily tell what clks are CRITICAL through the table. I added a warning for using the init_table to enable clks. I considered removing it entirely, but I thought phasing it out might be better. Rhyland Klein (11): clk: tegra: Switch to using critical clks clk: tegra20: Mark required clks

Re: [PATCH] mfd: max77620: Fix FPS switch statements

2016-05-27 Thread Rhyland Klein
On 5/12/2016 1:52 PM, Laxman Dewangan wrote: > > On Thursday 12 May 2016 11:15 PM, Rhyland Klein wrote: >> When configuring FPS during probe, assuming a DT node is present for >> FPS, the code can run into a problem with the switch statements in >> m

[PATCH v5] clk: tegra: Initialize UTMIPLL when enabling PLLU

2016-05-26 Thread Rhyland Klein
n: define UTMIP_PLL_CFG1_ENABLE_DLY_COUNT(x) (((x) & 0x1f) << 27) which matches the Tegra124 TRM register definition. Signed-off-by: Andrew Bresticker [rklein: Merged in some later fixes for potential deadlocks] Signed-off-by: Rhyland Klein --- v5: - Initialized flags to 0 to avoid harmless spinlock warni

[PATCH 01/11] clk: tegra: Switch to using critical/handoff clks

2016-05-25 Thread Rhyland Klein
is less in mainline and some clks might not be requested then Signed-off-by: Rhyland Klein --- drivers/clk/tegra/clk-tegra-periph.c | 21 ++--- drivers/clk/tegra/clk-tegra-super-gen4.c | 12 +++- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/drivers/

[PATCH 02/11] clk: tegra20: Mark required clks as CRITICAL

2016-05-25 Thread Rhyland Klein
Mark clks that are required to be on as CRITICAL clks. Signed-off-by: Rhyland Klein --- drivers/clk/tegra/clk-tegra20.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c index 837e5cbd60e9

[PATCH 06/11] clk: tegra114: clean up init_table

2016-05-25 Thread Rhyland Klein
Remove entries from the init_table where the clks are now defined as CRITICAL clks, if we were only enabling them in the init_table. Remove the flag to signal to enable CRITICAL clks if they are still needed in the init_table to set other properties. Signed-off-by: Rhyland Klein --- drivers

[PATCH 03/11] clk: tegra20: clean up init_table

2016-05-25 Thread Rhyland Klein
Remove entries from the init_table where the clks are now defined as CRITICAL clks, if we were only enabling them in the init_table. Remove the flag to signal to enable CRITICAL clks if they are still needed in the init_table to set other properties. Signed-off-by: Rhyland Klein --- drivers

[PATCH 09/11] clk: tegra210: clean up init_table

2016-05-25 Thread Rhyland Klein
Remove entries from the init_table where the clks are now defined as CRITICAL clks, if we were only enabling them in the init_table. Remove the flag to signal to enable CRITICAL clks if they are still needed in the init_table to set other properties. Signed-off-by: Rhyland Klein --- drivers

[PATCH 05/11] clk: tegra30: clean up init_table

2016-05-25 Thread Rhyland Klein
Remove entries from the init_table where the clks are now defined as CRITICAL clks, if we were only enabling them in the init_table. Remove the flag to signal to enable CRITICAL clks if they are still needed in the init_table to set other properties. Signed-off-by: Rhyland Klein --- drivers

[PATCH 07/11] clk: tegra124: clean up init_table

2016-05-25 Thread Rhyland Klein
Remove entries from the init_table where the clks are now defined as CRITICAL clks, if we were only enabling them in the init_table. Remove the flag to signal to enable CRITICAL clks if they are still needed in the init_table to set other properties. Signed-off-by: Rhyland Klein --- drivers

[PATCH 08/11] clk: tegra210: Mark required clks as CRITICAL

2016-05-25 Thread Rhyland Klein
Mark clks that are required to be on as CRITICAL clks. Signed-off-by: Rhyland Klein --- drivers/clk/tegra/clk-tegra210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/tegra/clk-tegra210.c b/drivers/clk/tegra/clk-tegra210.c index b8551813ec43..156dc8ec6bf6

[PATCH 11/11] clk: tegra: WARN if clk in the init_table has enable

2016-05-25 Thread Rhyland Klein
Enabling clocks through the init_table mechanism is deprecated. Clocks that need to be enabled early and stay on should be marked as CRITICAL. Signed-off-by: Rhyland Klein --- drivers/clk/tegra/clk.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/clk/tegra/clk.c b/drivers/clk

[PATCH 04/11] clk: tegra30: Mark certain clks as critical

2016-05-25 Thread Rhyland Klein
Mark the required clks as critical so the core will enable them during registration and therefore they will stay on. Signed-off-by: Rhyland Klein --- drivers/clk/tegra/clk-tegra30.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/clk/tegra/clk-tegra30

[PATCH 10/11] clk: Show CRITICAL clks in clk_summary output

2016-05-25 Thread Rhyland Klein
Add a '^' character to the beginning of clk entries that are for CRITICAL clks. Signed-off-by: Rhyland Klein --- drivers/clk/clk.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 874c7dd8ef66..22dd0ca1e491 10

[PATCH 00/11] Switch to using CRITICAL clks for Tegra

2016-05-25 Thread Rhyland Klein
able to easily tell what clks are CRITICAL through the table. I added a warning for using the init_table to enable clks. I considered removing it entirely, but I thought phasing it out might be better. Rhyland Klein (11): clk: tegra: Switch to using critical/handoff clks clk: tegra20: Mark

Re: [PATCH] arm64: defconfig: Enable cros-ec and battery driver

2016-05-25 Thread Rhyland Klein
On 5/25/2016 1:26 PM, Jon Hunter wrote: > > On 25/05/16 17:36, Rhyland Klein wrote: > > ... > >> I can see that getting the temperature could work. I would point out >> that I don't see any recent changes to bq27xxx or the power_supply_core >> that would i

Re: [PATCH] arm64: defconfig: Enable cros-ec and battery driver

2016-05-25 Thread Rhyland Klein
On 5/25/2016 12:29 PM, Jon Hunter wrote: > > On 25/05/16 17:10, Jon Hunter wrote: > > ... > >> So power_supply_read_temp() calls ->get_property() and passes the >> power_supply psy struct which is initialised. The problem is that inside >> the bq27xxx driver, this then kicks off the worker threa

Re: [PATCH] arm64: defconfig: Enable cros-ec and battery driver

2016-05-25 Thread Rhyland Klein
On 5/25/2016 11:46 AM, Thierry Reding wrote: > On Wed, May 25, 2016 at 12:03:47PM +0100, Jon Hunter wrote: >> >> On 25/05/16 11:58, Jon Hunter wrote: >> >> ... >> >>> Looking at this a bit more I am wondering if we should prevent the >>> battery for being polled before the registration has complete

Re: [PATCH] arm64: defconfig: Enable cros-ec and battery driver

2016-05-25 Thread Rhyland Klein
On 5/25/2016 7:03 AM, Jon Hunter wrote: > > On 25/05/16 11:58, Jon Hunter wrote: > > ... I am aware of the splat, and I was considering the proper place for working around that. > >> Looking at this a bit more I am wondering if we should prevent the >> battery for being polled before the regis

Re: [PATCH] arm64: defconfig: Enable cros-ec and battery driver

2016-05-24 Thread Rhyland Klein
On 5/24/2016 10:09 AM, Jon Hunter wrote: > Hi Rhyland, > > On 03/05/16 16:45, Rhyland Klein wrote: >> Enable the ChromeOS Embedded Controller, its I2C tunnel driver, and >> the BA27XXX battery driver. These are all used on the Tegra210 Smaug >> platform. >> >&g

Re: [PATCH] arm64: defconfig: Enable cros-ec and battery driver

2016-05-19 Thread Rhyland Klein
On 5/3/2016 11:45 AM, Rhyland Klein wrote: > Enable the ChromeOS Embedded Controller, its I2C tunnel driver, and > the BA27XXX battery driver. These are all used on the Tegra210 Smaug > platform. > > Signed-off-by: Rhyland Klein Has anyone had a chance to review this

Re: drivers/of: crash on boot

2016-05-18 Thread Rhyland Klein
On 5/18/2016 3:58 PM, Rhyland Klein wrote: > On 5/18/2016 3:36 PM, Rob Herring wrote: >> On Wed, May 18, 2016 at 10:34 AM, Sasha Levin wrote: >>> Hi Rhyland, >>> >>> I'm seeing a crash on boot that seems to have been caused by >>> &

Re: drivers/of: crash on boot

2016-05-18 Thread Rhyland Klein
On 5/18/2016 3:36 PM, Rob Herring wrote: > On Wed, May 18, 2016 at 10:34 AM, Sasha Levin wrote: >> Hi Rhyland, >> >> I'm seeing a crash on boot that seems to have been caused by >> "drivers/of: Fix depth when unflattening devicetree": >> >> [ 61.145229] >> ==

[PATCH] mfd: max77620: Fix FPS switch statements

2016-05-12 Thread Rhyland Klein
all through to the default switch case and return -EINVAL. Returning this from max77620_config_fps() will cause probe to fail. Signed-off-by: Rhyland Klein --- drivers/mfd/max77620.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mfd/max77620.c b/drivers/mfd/max77620.c index 199d26199

[PATCH] arm64: defconfig: Enable cros-ec and battery driver

2016-05-03 Thread Rhyland Klein
Enable the ChromeOS Embedded Controller, its I2C tunnel driver, and the BA27XXX battery driver. These are all used on the Tegra210 Smaug platform. Signed-off-by: Rhyland Klein --- arch/arm64/configs/defconfig | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm64/configs/defconfig b

Re: [PATCH 1/1] pinctrl: tegra: avoid parked_reg and parked_bank

2016-05-02 Thread Rhyland Klein
On 5/2/2016 10:28 AM, Laxman Dewangan wrote: > NVIDIA's Tegra210 support the park bit to make pinmux configuration > enable/disable. If parked bit is 1 then configuration does not apply > and if it is 0 then pinmux configuration applies. This is to support > to avoid any glitch in pinmux configurat

Re: [PATCH 1/2] clk: tegra: Fix pllre Tegra210 and add pll_re_out1

2016-04-15 Thread Rhyland Klein
On 4/12/2016 11:23 AM, Thierry Reding wrote: > * PGP Signed by an unknown key > > On Mon, Mar 21, 2016 at 03:58:52PM -0400, Rhyland Klein wrote: >> Use a new Tegra210 version of the pll_register_pllre function to >> allow setting the proper settings for the m and n div field

[PATCH] arm64: tegra: Enable cros-ec and charger on Smaug

2016-04-14 Thread Rhyland Klein
Add nodes for the ChromeOS Embedded Controller and for the gas gauge connected to the I2C bus that it controls. Signed-off-by: Rhyland Klein --- arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 27 +++ 1 file changed, 27 insertions(+) diff --git a/arch/arm64/boot/dts

[PATCH] mfd: cros_ec: Enable cros-ec driver for arm64

2016-04-14 Thread Rhyland Klein
The cros-ec driver should also be enabled for arm64 platforms as there are platforms, like the tegra210-smaug which make use of the ChromeOS Embedded Controller. Signed-off-by: Rhyland Klein --- drivers/mfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd

[PATCH v2] arm64: tegra: Add pinmux for Smaug board

2016-04-11 Thread Rhyland Klein
Add pinmux node for Tegra210 Smaug board. Signed-off-by: Rhyland Klein --- v2: - Fixed address to align with recent patch: 'arm64: tegra: Remove 0, prefix from unit-addresses' arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 1271 + 1 file changed, 1271

Re: [PATCH 1/2] clk: tegra: Fix pllre Tegra210 and add pll_re_out1

2016-04-08 Thread Rhyland Klein
On 3/21/2016 3:58 PM, Rhyland Klein wrote: > Use a new Tegra210 version of the pll_register_pllre function to > allow setting the proper settings for the m and n div fields. > > Additionally define PLL_RE_OUT1 on Tegra210. > > Signed-off-by: Rhyland Klein > --- Ping. >

[PATCH] pinctrl: tegra: clear park bit for all pins

2016-04-07 Thread Rhyland Klein
-1 to disable. The park bit is used to prevent glitching when reprogramming pinctrl registers. Based on work by: Shravani Dingari Signed-off-by: Rhyland Klein --- drivers/pinctrl/tegra/pinctrl-tegra.c| 18 ++ drivers/pinctrl/tegra/pinctrl-tegra.h| 6 ++ drivers/pi

[PATCH] arm64: tegra: Add pinmux for Smaug board

2016-04-06 Thread Rhyland Klein
Add pinmux node for Tegra210 Smaug board. Signed-off-by: Rhyland Klein --- arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 1272 + 1 file changed, 1272 insertions(+) diff --git a/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts b/arch/arm64/boot/dts/nvidia/tegra210

Re: [PATCH] sbs-battery: fix power status when battery is dry

2016-03-30 Thread Rhyland Klein
On 3/30/2016 4:58 AM, YH Huang wrote: > On Tue, 2016-03-29 at 11:05 -0400, Rhyland Klein wrote: >> On 3/28/2016 9:52 PM, YH Huang wrote: >>> On Mon, 2016-03-28 at 11:57 -0400, Rhyland Klein wrote: >>>> On 3/28/2016 6:05 AM, Daniel Kurtz wrote: >>>>>

Re: [PATCH] sbs-battery: fix power status when battery is dry

2016-03-29 Thread Rhyland Klein
On 3/28/2016 9:52 PM, YH Huang wrote: > On Mon, 2016-03-28 at 11:57 -0400, Rhyland Klein wrote: >> On 3/28/2016 6:05 AM, Daniel Kurtz wrote: >>> +Rhyland Klein who original wrote this code... >>> >>> On Mon, Mar 28, 2016 at 10:32 AM, YH Huang wrote: >>

Re: [PATCH] sbs-battery: fix power status when battery is dry

2016-03-28 Thread Rhyland Klein
On 3/28/2016 6:05 AM, Daniel Kurtz wrote: > +Rhyland Klein who original wrote this code... > > On Mon, Mar 28, 2016 at 10:32 AM, YH Huang wrote: >> >> On Fri, 2016-03-25 at 11:06 +0800, Daniel Kurtz wrote: >>> On Thu, Mar 24, 2016 at 2:43 PM, YH Huang wrote: >

[PATCH 2/2] clk: tegra: Initialize UTMIPLL when enabling PLLU

2016-03-21 Thread Rhyland Klein
From: Andrew Bresticker Move the UTMIPLL initialization code from the clk-tegra.c files into clk-pll.c and perform the initialization sequence when PLLU is enabled. Signed-off-by: Andrew Bresticker [rklein: Merged in some later fixes for potential deadlocks] Signed-off-by: Rhyland Klein

[PATCH 1/2] clk: tegra: Fix pllre Tegra210 and add pll_re_out1

2016-03-21 Thread Rhyland Klein
Use a new Tegra210 version of the pll_register_pllre function to allow setting the proper settings for the m and n div fields. Additionally define PLL_RE_OUT1 on Tegra210. Signed-off-by: Rhyland Klein --- drivers/clk/tegra/clk-pll.c | 46 drivers

Re: [PATCH 17/41] clk: tegra: Remove CLK_IS_ROOT

2016-03-02 Thread Rhyland Klein
On 3/1/2016 2:00 PM, Stephen Boyd wrote: > This flag is a no-op now. Remove usage of the flag. > > Cc: Rhyland Klein > Cc: Thierry Reding > Signed-off-by: Stephen Boyd > --- > drivers/clk/tegra/clk-audio-sync.c | 2 +- > drivers/clk/tegra/clk-dfll.c| 1 -

Re: [PATCH] mfd: Fix MACRO for commonly declared MFD cell attributes

2016-02-26 Thread Rhyland Klein
On 2/19/2016 11:28 AM, Rhyland Klein wrote: > On 2/19/2016 3:50 AM, Lee Jones wrote: >> On Thu, 18 Feb 2016, Rhyland Klein wrote: >> >>> MFD_ARRAY_SIZE() would not accurately return 0 if the passed >>> parameter was NULL. Fix this so that num_resources will >

Re: [PATCH] mfd: Fix MACRO for commonly declared MFD cell attributes

2016-02-19 Thread Rhyland Klein
On 2/19/2016 3:50 AM, Lee Jones wrote: > On Thu, 18 Feb 2016, Rhyland Klein wrote: > >> MFD_ARRAY_SIZE() would not accurately return 0 if the passed >> parameter was NULL. Fix this so that num_resources will >> accurately be 0 in the case that _res is NULL. >> &

[PATCH] mfd: Fix MACRO for commonly declared MFD cell attributes

2016-02-18 Thread Rhyland Klein
MFD_ARRAY_SIZE() would not accurately return 0 if the passed parameter was NULL. Fix this so that num_resources will accurately be 0 in the case that _res is NULL. cc: Lee Jones cc: Laxman Dewangan Signed-off-by: Rhyland Klein --- include/linux/mfd/core.h | 15 +-- 1 file changed

Re: [PATCH] clk: clk_register: Correctly initialize enable_count

2016-02-11 Thread Rhyland Klein
On 2/11/2016 4:32 PM, Michael Turquette wrote: > Quoting Rhyland Klein (2016-02-10 10:34:16) >> On 2/9/2016 9:56 PM, Emilio López wrote: >>> Hi, >>> >>> El 09/02/16 a las 19:48, Rhyland Klein escribió: >>>> When clocks are registered, they could be

Re: [PATCH] clk: clk_register: Correctly initialize enable_count

2016-02-10 Thread Rhyland Klein
On 2/9/2016 9:56 PM, Emilio López wrote: > Hi, > > El 09/02/16 a las 19:48, Rhyland Klein escribió: >> When clocks are registered, they could be enabled already in >> hardware. As of now, the enable count will start at 0. When this >> happens, it means a clock is enable

[PATCH] clk: clk_register: Correctly initialize enable_count

2016-02-09 Thread Rhyland Klein
_count the first time someone calls clk_enable() for a clk that was on at boot. Signed-off-by: Rhyland Klein --- Perhaps this code should be something optional right now? I can't test all boards that use this framework, and some boards may be using the clocks that are on but thought off witho

Re: [PATCH] clk: tegra: Fix divider settings for Tegra210 pll_a

2016-02-05 Thread Rhyland Klein
On 2/5/2016 9:01 AM, Jon Hunter wrote: > When setting the pll_a frequency, to what should be 368639844 Hz, the > actual output frequency of the pll is 737279687 Hz (as reported by the > debugfs clk_summary entry), which is double the expect frequency. The > calculations for the pll frequency appear

Re: [PATCH 2/2] clk: tegra: Use definition for pll_u override bit

2015-12-21 Thread Rhyland Klein
- val &= ~BIT(24); /* disable PLLU_OVERRIDE */ > + val &= ~PLLU_BASE_OVERRIDE; /* disable PLLU_OVERRIDE */ > writel(val, clk_base + pll_u_vco_params.base_reg); > > clk = tegra_clk_register_pllre("pll_u_vco", "pll_ref", clk_base, pmc,

Re: [PATCH 1/2] clk: tegra: Fix warning caused by pll_u failing to lock

2015-12-21 Thread Rhyland Klein
{ TEGRA210_CLK_PLL_RE_VCO, TEGRA210_CLK_CLK_MAX, 67200, 1 }, > - { TEGRA210_CLK_PLL_U_OUT1, TEGRA210_CLK_CLK_MAX, 4800, 1 }, > - { TEGRA210_CLK_PLL_U_OUT2, TEGRA210_CLK_CLK_MAX, 6000, 1 }, > { TEGRA210_CLK_XUSB_GATE, TEGRA210_CLK_CLK_MAX, 0, 1 }, >

  1   2   3   4   >