Re: [PATCH v2 2/4] hwmon: Use subdir-ccflags-* to inherit debug flag

2021-02-09 Thread Guenter Roeck
On Tue, Feb 09, 2021 at 07:08:17PM +0800, Yicong Yang wrote: > From: Junhao He > > We use ccflags-$(CONFIG_HWMON_DEBUG_CHIP) for the debug > message in drivers/hwmon, but the DEBUG flag will not pass to > the subdirectory. > > Considering CONFIG_HWMON_DEBUG_CHIP intends to have DEBUG > recursive

Re: [PATCH 2/4] hwmon: Use subdir-ccflags-* to inherit debug flag

2021-02-08 Thread Guenter Roeck
On 2/5/21 12:08 PM, Bjorn Helgaas wrote: > On Fri, Feb 05, 2021 at 10:28:32AM -0800, Guenter Roeck wrote: >> On Fri, Feb 05, 2021 at 05:44:13PM +0800, Yicong Yang wrote: >>> From: Junhao He >>> >>> Use subdir-ccflags-* instead of ccflags-* to inherit the

Re: [PATCH 2/4] hwmon: Use subdir-ccflags-* to inherit debug flag

2021-02-05 Thread Guenter Roeck
On Fri, Feb 05, 2021 at 05:44:13PM +0800, Yicong Yang wrote: > From: Junhao He > > Use subdir-ccflags-* instead of ccflags-* to inherit the debug > settings from Kconfig when traversing subdirectories. > > Suggested-by: Bjorn Helgaas > Signed-off-by: Junhao He > Signed-off-by: Yicong Yang Wh

Re: [PATCH 1/2] staging: octeon: delete driver

2020-02-05 Thread Guenter Roeck
On 2/5/20 1:03 AM, Geert Uytterhoeven wrote: On Wed, Feb 5, 2020 at 4:57 AM Guenter Roeck wrote: On 2/4/20 7:34 PM, Dan Carpenter wrote: On Tue, Feb 04, 2020 at 12:31:16PM -0800, Matthew Wilcox wrote: On Tue, Feb 04, 2020 at 08:06:14PM +, Chris Packham wrote: On Tue, 2020-02-04 at 07:09

Re: [PATCH 1/2] staging: octeon: delete driver

2020-02-04 Thread Guenter Roeck
On 2/4/20 7:34 PM, Dan Carpenter wrote: On Tue, Feb 04, 2020 at 12:31:16PM -0800, Matthew Wilcox wrote: On Tue, Feb 04, 2020 at 08:06:14PM +, Chris Packham wrote: On Tue, 2020-02-04 at 07:09 +, gre...@linuxfoundation.org wrote: On Tue, Feb 04, 2020 at 04:02:15AM +, Chris Packham wr

Re: [SPAM] Re: [PATCH 1/2] staging: octeon: delete driver

2020-02-04 Thread Guenter Roeck
cause build issues and other problems > > > > > for > > > > > people who want to fix coding style problems, but can not actually > > > > > build > > > > > it. > > > > > > > > > > As nothing is happeni

Re: [PATCH 1/2] staging: octeon: delete driver

2019-12-10 Thread Guenter Roeck
On Tue, Dec 10, 2019 at 11:48:49PM +0200, Aaro Koskinen wrote: > On Tue, Dec 10, 2019 at 12:15:15PM -0800, Guenter Roeck wrote: > > On Tue, Dec 10, 2019 at 09:46:59PM +0200, Aaro Koskinen wrote: > > > On Tue, Dec 10, 2019 at 01:01:20PM +0100, Greg Kroah-Hartman wrote: >

Re: [PATCH 1/2] staging: octeon: delete driver

2019-12-10 Thread Guenter Roeck
On Tue, Dec 10, 2019 at 09:46:59PM +0200, Aaro Koskinen wrote: > On Tue, Dec 10, 2019 at 01:01:20PM +0100, Greg Kroah-Hartman wrote: > > On Tue, Dec 10, 2019 at 12:40:54PM +0100, Sandro Volery wrote: > > > Doesn't octeon have drivers out of staging already? > > > What is this module for? > > > > I

Re: [PATCH 1/2] staging: octeon: delete driver

2019-12-10 Thread Guenter Roeck
here, just delete the module entirely. Reported-by: Guenter Roeck Cc: David Daney Cc: "David S. Miller" Cc: "Matthew Wilcox (Oracle)" Cc: Guenter Roeck Cc: YueHaibing Cc: Aaro Koskinen Cc: Wambui Karuga Cc: Julia Lawall Cc: Florian Westphal Cc: Geert Uytterhoeven Cc

Re: [PATCH] staging/octeon: Mark Ethernet driver as BROKEN

2019-12-02 Thread Guenter Roeck
On Mon, Dec 02, 2019 at 05:52:31PM +0100, Greg Kroah-Hartman wrote: > On Mon, Dec 02, 2019 at 06:18:36AM -0800, Guenter Roeck wrote: > > The code doesn't compile due to incompatible pointer errors such as > > > > drivers/staging/octeon/ethernet-tx.c:649:50: error: >

[PATCH] staging/octeon: Mark Ethernet driver as BROKEN

2019-12-02 Thread Guenter Roeck
ges pointless and wrong. Reflect reality and mark the driver as BROKEN. Fixes: ef1fe6b7369a ("staging: octeon: remove typedef declaration for cvmx_wqe") Fixes: 73aef0c9d2c6 ("staging: octeon: remove typedef declaration for cvmx_helper_link_info") Cc: Wambui Karuga Cc: Julia

Re: [PATCH 1/3] iio: Add ADM1177 Hot Swap Controller and Digital Power Monitor driver

2019-11-13 Thread Guenter Roeck
On Wed, Nov 13, 2019 at 08:10:50AM +, Hennerich, Michael wrote: > > > > -Original Message- > > From: Guenter Roeck On Behalf Of Guenter Roeck > > Sent: Dienstag, 12. November 2019 20:18 > > To: Jonathan Cameron > > Cc: Bia, Beniamin ; j

Re: [PATCH 1/3] iio: Add ADM1177 Hot Swap Controller and Digital Power Monitor driver

2019-11-12 Thread Guenter Roeck
On Tue, Nov 12, 2019 at 05:37:57PM +, Jonathan Cameron wrote: > On Tue, 12 Nov 2019 17:35:50 +0200 > Beniamin Bia wrote: > > > From: Michael Hennerich > > > > ADM1177 is a Hot Swap Controller and Digital Power Monitor with > > Soft Start Pin. > > > > Datasheet: > > Link: > > https://www.a

[PATCH] staging/octeon: Fix test build on MIPS

2019-11-10 Thread Guenter Roeck
s enabled. Since the driver uses those defines, we have to use the dummy defines if this flag is not enabled. Cc: Matthew Wilcox (Oracle) Fixes: 171a9bae68c7 ("staging/octeon: Allow test build on !MIPS") Signed-off-by: Guenter Roeck --- drivers/staging/octeon/octeon-ethernet.h | 2 +- 1 f

[PATCH] staging: kpc2000: Fix build failure caused by wrong include file

2019-05-30 Thread Guenter Roeck
Fixes: 7df95299b94a ("staging: kpc2000: Add DMA driver") Cc: Matt Sickler Signed-off-by: Guenter Roeck --- drivers/staging/kpc2000/kpc_dma/fileops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/kpc2000/kpc_dma/fileops.c b/drivers/staging/k

Re: [PATCH net-next] staging: octeon: fix build failure with XFRM enabled

2018-12-21 Thread Guenter Roeck
On Fri, Dec 21, 2018 at 09:57:26PM +0100, Florian Westphal wrote: > skb->sp doesn't exist anymore in the next-next tree, so mips defconfig > no longer builds. Use helper instead to reset the secpath. > > Not even compile tested. > It does fix the build error. Tested-b

[PATCH] android: binder_alloc: Include asm/cacheflush.h after linux/ include files

2018-07-23 Thread Guenter Roeck
page' declared inside parameter list Moving the asm/ include after linux/ includes fixes the problem. Suggested-by: Linus Torvalds Signed-off-by: Guenter Roeck --- drivers/android/binder_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/android/binder_alloc.c

[PATCH] android: binder: Include asm/cacheflush.h after linux/ include files

2018-07-23 Thread Guenter Roeck
red inside parameter list will not be visible outside of this definition or declaration Moving the asm/ include after linux/ includes solves the problem. Suggested-by: Linus Torvalds Signed-off-by: Guenter Roeck --- drivers/android/binder.c | 4 +++- 1 file changed, 3 insertions(+),

[PATCH] media: staging: omap4iss: Include asm/cacheflush.h after generic includes

2018-07-23 Thread Guenter Roeck
4l: omap4iss: Add support for OMAP4 camera interface - Video devices") Suggested-by: Linus Torvalds Cc: David Miller Cc: Randy Dunlap Signed-off-by: Guenter Roeck --- drivers/staging/media/omap4iss/iss_video.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/

[PATCH] staging: speakup: Replace strncpy with memcpy

2018-07-01 Thread Guenter Roeck
ng as its length drivers/staging/speakup/kobjects.c:388:8: note: length computed here Using strncpy() is indeed less than perfect since the length of data to be copied has already been determined with strlen(). Replace strncpy() with memcpy() to address the warning and optimize the code

Re: [PATCH v2 0/3] hwmon: (nct7904) Fix style issues

2018-06-13 Thread Guenter Roeck
On Wed, Jun 13, 2018 at 05:13:22PM +0200, Jakob Albert wrote: > This set of patches fixes style errors reported by checkpatch.pl. This > adapts the code to the coding style. > > Changes since v1: > * Changed patch subjects and descriptions > > > > Jakob Albert (3): > hwmon: (nct7904) Fix SPAC

Re: [PATCH 1/3] staging: hwmon: Fix SPACING errors

2018-06-12 Thread Guenter Roeck
On Tue, Jun 12, 2018 at 08:56:58PM +0200, Jakob Albert wrote: > Fix SPACING errors in drivers/hwmon/nct7904.c reported by checkpatch.pl > Subject for all patches in this series should be hwmon: (nct7904) There is no need to reference the file name in the patch description. It is obvious from b

Re: [PATCH v4 11/13] staging: typec: tcpci: keep the not connecting cc line open

2018-03-30 Thread Guenter Roeck
On 03/28/2018 09:06 AM, Li Jun wrote: While set polarity, we should keep the not connecting cc line to be open. The more I look at this code, the more I am confused by it. The original code doesn't touch the CC lines. This function only sets the polarity. Is it really appropriate to touch th

Re: [PATCH v4 10/13] usb: typec: tcpm: set cc for drp toggling attach

2018-03-29 Thread Guenter Roeck
On Thu, Mar 29, 2018 at 12:06:15AM +0800, Li Jun wrote: > In case of drp toggling, we may need set correct cc value for role control > after attach as it may never been set. > Isn't CC set by the lower level driver in this case ? In other words, is it ever necessary to call back into the low leve

Re: [PATCH] typec: tcpm: fusb302: Do not log an error on -EPROBE_DEFER

2018-02-25 Thread Guenter Roeck
On 02/25/2018 07:20 AM, Hans de Goede wrote: Do not log an error if tcpm_register_port() fails with -EPROBE_DEFER. Fixes: commit cf140a356971 ("typec: fusb302: Use dev_err during probe") Signed-off-by: Hans de Goede Reviewed-by: Guenter Roeck --- drivers/usb/typec/fusb302/fus

Re: [PATCH v3 00/27] kill devm_ioremap_nocache

2017-12-23 Thread Guenter Roeck
On 12/23/2017 05:48 AM, Greg KH wrote: On Sat, Dec 23, 2017 at 06:55:25PM +0800, Yisheng Xie wrote: Hi all, When I tried to use devm_ioremap function and review related code, I found devm_ioremap and devm_ioremap_nocache is almost the same with each other, except one use ioremap while the other

Re: [PATCH v2 10/11] staging: typec: fusb302: Hook up mux support using tcpc_gen_mux support

2017-09-13 Thread Guenter Roeck
On Wed, Sep 13, 2017 at 05:48:25PM +0200, Hans de Goede wrote: > Hi, > > On 13-09-17 17:07, Rob Herring wrote: > >On Wed, Sep 13, 2017 at 9:06 AM, Hans de Goede wrote: > >>Hi, > >> > >> > >>On 13-09-17 15:38, Rob Herring wrote: > >>> > >>>On Wed, Sep 13, 2017 at 3:56 AM, Hans de Goede > >>>wrote

Re: [PATCH v3 1/5] staging: typec: tcpm: Drop commented out code

2017-09-12 Thread Guenter Roeck
On Tue, Sep 12, 2017 at 10:38:39AM +0300, Heikki Krogerus wrote: > On Mon, Sep 11, 2017 at 08:32:04PM -0700, Guenter Roeck wrote: > > Commented out code can be added as needed. Drop it. > > Also drop TODO and an obsolete XXX comment. > > > > Signed-off-by: Guenter Ro

[PATCH v3 3/5] staging: typec: pd: Document struct pd_message

2017-09-11 Thread Guenter Roeck
struct pd_message is the format of a PD message as seen on the wire. Signed-off-by: Guenter Roeck --- v2: No change v3: Fix document tag drivers/staging/typec/pd.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/staging/typec/pd.h b/drivers/staging/typec/pd.h index

[PATCH v3 1/5] staging: typec: tcpm: Drop commented out code

2017-09-11 Thread Guenter Roeck
Commented out code can be added as needed. Drop it. Also drop TODO and an obsolete XXX comment. Signed-off-by: Guenter Roeck --- v2, v3: No change drivers/staging/typec/tcpm.c | 37 + 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/drivers

[PATCH v3 5/5] usb: typec: fusb302: Move out of staging

2017-09-11 Thread Guenter Roeck
The driver is in good enough shape to be moved out of staging. Do it. Signed-off-by: Guenter Roeck --- v2: Use format-patch -M v3: No change drivers/staging/typec/Kconfig| 2 -- drivers/staging/typec/Makefile | 1 - drivers/staging/typec/fusb302

[PATCH v3 4/5] typec: tcpm: Move out of staging

2017-09-11 Thread Guenter Roeck
Move tcpm (USB Type-C Port Manager) out of staging. Signed-off-by: Guenter Roeck --- v2: Use format-patch -M v3: No change drivers/staging/typec/Kconfig | 8 drivers/staging/typec/Makefile| 1 - drivers/staging/typec/TODO

[PATCH v3 2/5] staging: typec: tcpm: Document data structures

2017-09-11 Thread Guenter Roeck
Document struct tcpc_config and struct tcpc_dev. Drop unused TCPC_USB_SWITCH_RESTORE. Signed-off-by: Guenter Roeck --- v2, v3: No change drivers/staging/typec/tcpm.h | 57 ++-- 1 file changed, 50 insertions(+), 7 deletions(-) diff --git a/drivers

Re: [PATCH 1/5] staging: typec: tcpm: Drop commented out code

2017-09-11 Thread Guenter Roeck
On Mon, Sep 11, 2017 at 11:26:01AM -0700, Greg Kroah-Hartman wrote: > On Mon, Sep 11, 2017 at 10:37:11AM -0700, Guenter Roeck wrote: > > On Mon, Sep 11, 2017 at 09:23:34AM -0700, Greg Kroah-Hartman wrote: > > > On Sun, Sep 10, 2017 at 01:37:01PM -0700, Guenter Roeck wrote: >

Re: [PATCH 1/5] staging: typec: tcpm: Drop commented out code

2017-09-11 Thread Guenter Roeck
On Mon, Sep 11, 2017 at 09:23:34AM -0700, Greg Kroah-Hartman wrote: > On Sun, Sep 10, 2017 at 01:37:01PM -0700, Guenter Roeck wrote: > > Commented out code can be added as needed. Drop it. > > Also drop TODO and an obsolete XXX comment. > > > > Signed-off-by: Guenter

[PATCH v2 5/5] usb: typec: fusb302: Move out of staging

2017-09-10 Thread Guenter Roeck
The driver is in good enough shape to be moved out of staging. Do it. Signed-off-by: Guenter Roeck --- v2: Use format-patch -M drivers/staging/typec/Kconfig| 2 -- drivers/staging/typec/Makefile | 1 - drivers/staging/typec/fusb302/TODO

[PATCH v2 4/5] typec: tcpm: Move out of staging

2017-09-10 Thread Guenter Roeck
Move tcpm (USB Type-C Port Manager) out of staging. Signed-off-by: Guenter Roeck --- v2: Use format-patch -M drivers/staging/typec/Kconfig | 8 drivers/staging/typec/Makefile| 1 - drivers/staging/typec/TODO

[PATCH v2 2/5] staging: typec: tcpm: Document data structures

2017-09-10 Thread Guenter Roeck
Document struct tcpc_config and struct tcpc_dev. Drop unused TCPC_USB_SWITCH_RESTORE. Signed-off-by: Guenter Roeck --- v2: No change drivers/staging/typec/tcpm.h | 57 ++-- 1 file changed, 50 insertions(+), 7 deletions(-) diff --git a/drivers/staging

[PATCH v2 3/5] staging: typec: pd: Document struct pd_message

2017-09-10 Thread Guenter Roeck
struct pd_message is the format of a PD message as seen on the wire. Signed-off-by: Guenter Roeck --- v2: No change drivers/staging/typec/pd.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/staging/typec/pd.h b/drivers/staging/typec/pd.h index 30b32ad72acd..42a10883a2cb

[PATCH v2 1/5] staging: typec: tcpm: Drop commented out code

2017-09-10 Thread Guenter Roeck
Commented out code can be added as needed. Drop it. Also drop TODO and an obsolete XXX comment. Signed-off-by: Guenter Roeck --- v2: No change drivers/staging/typec/tcpm.c | 37 + 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/drivers/staging

Re: [PATCH v2 08/11] staging: typec: tcpm: Set mux to device mode when configured as such

2017-09-10 Thread Guenter Roeck
the mux to TYPEC_MUX_NONE, TCPC_USB_SWITCH_DISCONNECT so that it does not and up staying in host (and with this commit also device) mode after a detach. This sentence is hard to understand. Signed-off-by: Hans de Goede Otherwise Reviewed-by: Guenter Roeck --- drivers/staging/typec

Re: [PATCH 4/5] typec: tcpm: Move out of staging

2017-09-10 Thread Guenter Roeck
On 09/10/2017 01:46 PM, Joe Perches wrote: On Sun, 2017-09-10 at 13:37 -0700, Guenter Roeck wrote: Move tcpm (USB Type-C Port Manager) out of staging. git format-patch -M Thanks - I'll resend but wait a bit for additional comments before I do. Gu

[PATCH 3/5] staging: typec: pd: Document struct pd_message

2017-09-10 Thread Guenter Roeck
struct pd_message is the format of a PD message as seen on the wire. Signed-off-by: Guenter Roeck --- drivers/staging/typec/pd.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/staging/typec/pd.h b/drivers/staging/typec/pd.h index 30b32ad72acd..42a10883a2cb 100644 --- a/drivers

[PATCH 2/5] staging: typec: tcpm: Document data structures

2017-09-10 Thread Guenter Roeck
Document struct tcpc_config and struct tcpc_dev. Drop unused TCPC_USB_SWITCH_RESTORE. Signed-off-by: Guenter Roeck --- drivers/staging/typec/tcpm.h | 57 ++-- 1 file changed, 50 insertions(+), 7 deletions(-) diff --git a/drivers/staging/typec/tcpm.h b

[PATCH 1/5] staging: typec: tcpm: Drop commented out code

2017-09-10 Thread Guenter Roeck
Commented out code can be added as needed. Drop it. Also drop TODO and an obsolete XXX comment. Signed-off-by: Guenter Roeck --- drivers/staging/typec/tcpm.c | 37 + 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/drivers/staging/typec/tcpm.c b

Re: [PATCH 1/2] staging: typec: tcpm: Validate source and sink caps

2017-09-09 Thread Guenter Roeck
On 09/09/2017 09:54 AM, Guenter Roeck wrote: On 09/08/2017 12:13 PM, Greg Kroah-Hartman wrote: On Fri, Sep 08, 2017 at 10:29:52AM -0700, Badhri Jagan Sridharan wrote: On Fri, Sep 8, 2017 at 2:45 AM, Greg Kroah-Hartman wrote: On Thu, Sep 07, 2017 at 06:22:13PM -0700, Badhri Jagan Sridharan

Re: [PATCH 1/2] staging: typec: tcpm: Validate source and sink caps

2017-09-09 Thread Guenter Roeck
On 09/08/2017 12:13 PM, Greg Kroah-Hartman wrote: On Fri, Sep 08, 2017 at 10:29:52AM -0700, Badhri Jagan Sridharan wrote: On Fri, Sep 8, 2017 at 2:45 AM, Greg Kroah-Hartman wrote: On Thu, Sep 07, 2017 at 06:22:13PM -0700, Badhri Jagan Sridharan wrote: The source and sink caps should follow th

Re: [PATCH 1/2] staging: typec: tcpm: Validate source and sink caps

2017-09-09 Thread Guenter Roeck
On Fri, Sep 08, 2017 at 09:13:25PM +0200, Greg Kroah-Hartman wrote: > On Fri, Sep 08, 2017 at 10:29:52AM -0700, Badhri Jagan Sridharan wrote: > > On Fri, Sep 8, 2017 at 2:45 AM, Greg Kroah-Hartman > > wrote: > > > On Thu, Sep 07, 2017 at 06:22:13PM -0700, Badhri Jagan Sridharan wrote: > > >> The s

Re: [PATCH 2/2] staging: typec: tcpm: Only request matching pdos

2017-09-09 Thread Guenter Roeck
On Sat, Sep 09, 2017 at 11:48:48AM +0300, Dan Carpenter wrote: > On Fri, Sep 08, 2017 at 10:43:40AM -0700, Badhri Jagan Sridharan wrote: > > >> /* > > >> - * Select the source PDO providing the most power while staying > > >> within > > >> - * the board's voltage limits. Prefer PDO

Re: [PATCH 03/11] mux: consumer.h: Add MUX_USB_* state constant defines

2017-09-02 Thread Guenter Roeck
On Sat, Sep 02, 2017 at 05:59:14PM +0200, Hans de Goede wrote: > Hi, > > On 02-09-17 16:59, Guenter Roeck wrote: > >On 09/01/2017 02:48 PM, Hans de Goede wrote: > >>Add MUX_USB_* state constant defines, which can be used by USB > >>device/host and Type-C pola

Re: [PATCH 03/11] mux: consumer.h: Add MUX_USB_* state constant defines

2017-09-02 Thread Guenter Roeck
On 09/01/2017 02:48 PM, Hans de Goede wrote: Add MUX_USB_* state constant defines, which can be used by USB device/host and Type-C polarity/role/altmode mux drivers and consumers to ensure that they agree on the meaning of the mux_control_select() state argument. Signed-off-by: Hans de Goede --

Re: [PATCH][staging-next] staging: typec: fusb302: make structure fusb302_psy_desc static

2017-09-01 Thread Guenter Roeck
27; was not declared. Should it be static? > > Signed-off-by: Colin Ian King Reviewed-by: Guenter Roeck > --- > drivers/staging/typec/fusb302/fusb302.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/typec/fusb302/fusb302.c

Re: [PATCH v3 07/11] staging: typec: fusb302: Export current-limit through a power_supply class dev

2017-08-30 Thread Guenter Roeck
uot;Yueyao (Nathan) Zhu" Signed-off-by: Hans de Goede Reviewed-by: Guenter Roeck --- Changes in v2: -Put the psy class device code directly in fusb302.c rather then introducing helpers which are only used by fusb302.c -Add an online property to the psy so that upower does not mistake it

Re: [PATCH v3 06/11] staging: typec: fusb302: Add support for USB2 charger detection through extcon

2017-08-30 Thread Guenter Roeck
for kernel internal use by X86/ACPI platform code and as such is NOT documented in the fusb302 devicetree bindings. Cc: "Yueyao (Nathan) Zhu" Signed-off-by: Hans de Goede Reviewed-by: Guenter Roeck --- Changes in v2: -Put extcon code directly in fusb302.c rather then introducing

Re: [PATCH v3 05/11] staging: typec: fusb302: Use client->irq as irq if set

2017-08-30 Thread Guenter Roeck
On 08/30/2017 02:48 AM, Hans de Goede wrote: The fusb302 is also used on x86 systems where the platform code sets the irq in client->irq and there is no gpio named fcs,int_n. Cc: "Yueyao (Nathan) Zhu" Signed-off-by: Hans de Goede Reviewed-by: Guenter Roeck --- drivers/

Re: [PATCH v3 04/11] staging: typec: fusb302: Get max snk mv/ma/mw from device-properties

2017-08-30 Thread Guenter Roeck
;Yueyao (Nathan) Zhu" Signed-off-by: Hans de Goede Acked-by: Rob Herring Reviewed-by: Guenter Roeck --- Changes in v2: -Use micro... instead of mili... -Add devicetree bindings documentation Changes in v3: -Use sink rather then snk in property names -Add Rob's Acked-by --- .

Re: [PATCH v3 03/11] staging: typec: fusb302: Set max supply voltage to 5V

2017-08-30 Thread Guenter Roeck
. Cc: "Yueyao (Nathan) Zhu" Signed-off-by: Hans de Goede Reviewed-by: Guenter Roeck --- drivers/staging/typec/fusb302/fusb302.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/typec/fusb302/fusb302.c b/drivers/staging/typec/fusb302/fusb3

Re: [PATCH 1/6] staging: usb: typec: tcpm set port type callback

2017-08-27 Thread Guenter Roeck
internal port_type variable. Check against the tcpm port_type instead of checking against caps.type as port_type reflects the current configuration. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck --- drivers/staging/typec/tcpm.c | 52 ++-- 1

Re: [PATCH 11/11] staging: typec: tcpm: Switch to PORT_RESET instead of SNK_UNATTACHED

2017-08-27 Thread Guenter Roeck
rtner(source) to think that it is connected. > > To overcome this issue, force the port into PORT_RESET state > to make sure the CC lines are open. > > Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck > --- > drivers/staging/typec/tcpm.c | 2 +- > 1 file

Re: [PATCH 10/11] staging: typec: tcpm: Do not send PING msgs in TCPM

2017-08-27 Thread Guenter Roeck
to Type-A/B. So, removing sending > PING messages altogether. > > Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck > --- > drivers/staging/typec/tcpm.c | 11 --- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git a/drivers/stagi

Re: [PATCH 09/11] staging: typec: tcpm: typec: tcpm: Wait for CC debounce before PD excg

2017-08-27 Thread Guenter Roeck
OURCE_OFF is the overall > time after which the initial sink would issue hard reset. > > Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck > --- > drivers/staging/typec/pd.h | 2 ++ > drivers/staging/typec/tcpm.c | 25 ++--- > 2 f

Re: [PATCH 08/11] staging: typec: tcpm: add cc change handling in src states

2017-08-27 Thread Guenter Roeck
C_SEND_CAPABILITIES, > polarity 0, connected] > > This can happen when the lower layer driver and/or the hardware > handles a portion of the Type-C state machine work, and quietly goes > through the unattached state. > > Originally-from: Yueyao Zhu > Signed-off-by: B

Re: [PATCH 06/11 v2] staging: typec: tcpm: Comply with TryWait.SNK State

2017-08-27 Thread Guenter Roeck
t; Signed-off-by: Badhri Jagan Sridharan > --- > Changelog since v1: > - Corrected tag > For v2 up to here: Reviewed-by: Guenter Roeck > drivers/staging/typec/tcpm.c | 58 > +++- > 1 file changed, 30 insertions(+), 28 deletions(-) >

Re: [PATCH 07/11] staging: typec: tcpm: Consider port_type while determining unattached_state

2017-08-27 Thread Guenter Roeck
e PORT_RESET -> SRC_UNATTACHED > > Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck > --- > drivers/staging/typec/tcpm.c | 12 +--- > 1 file changed, 9 insertions(+), 3 deletions(-) > > diff --git a/drivers/staging/typec/tcpm.c b/drivers/stagi

Re: [PATCH 5/6] staging: usb: tcpm: usb: typec: tcpm: Follow Try.SRC exit requirements

2017-08-27 Thread Guenter Roeck
unce. The port shall transition to > TryWait.SNK after tDRPTry and the SRC.Rd state has not been > detected." > > Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck > --- > drivers/staging/typec/tcpm.c | 33 - >

Re: [PATCH 4/6] staging: usb: tcpm: usb: type-c: tcpm: Check for Rp for tPDDebounce

2017-08-27 Thread Guenter Roeck
t; Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck > --- > drivers/staging/typec/tcpm.c | 68 > > 1 file changed, 24 insertions(+), 44 deletions(-) > > diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/type

Re: [PATCH 3/6] staging: usb: tcpm: usb: typec: tcpm: Prevent TCPM from looping in SRC_TRYWAIT

2017-08-27 Thread Guenter Roeck
gt; 0 [state SRC_TRYWAIT, polarity 0, > disconnected] > [ 447.307858] state change SRC_TRYWAIT -> SRC_TRYWAIT > > In TCPM, tDRPTry is set tp 100ms (min 75ms and max 150ms) > and tCCdebounce is set to 200ms (min 100ms and max 200ms). > To overcome the issue, record the time at

Re: [PATCH 2/6] staging: usb: typec: Check for port type for Try.SRC/Try.SNK

2017-08-27 Thread Guenter Roeck
On Sat, Aug 26, 2017 at 10:24:12PM -0700, Badhri Jagan Sridharan wrote: > Enable Try.SRC or Try.SNK only when port_type is > DRP. Try.SRC or Try.SNK state machines are not > valid for SRC only or SNK only ports. > > Signed-off-by: Badhri Jagan Sridharan Reviewed-by

Re: [PATCH 1/6] staging: usb: typec: tcpm set port type callback

2017-08-27 Thread Guenter Roeck
Check against the tcpm port_type instead of checking > against caps.type as port_type reflects the current > configuration. > > Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck > --- > drivers/staging/typec/tcpm.c | 52 > +++

Re: [PATCH][staging-next] staging: typec: tcpm: make function tcpm_get_pwr_opmode

2017-08-27 Thread Guenter Roeck
r_opmode' was not declared. Should it be static? > > Signed-off-by: Colin Ian King Reviewed-by: Guenter Roeck > --- > drivers/staging/typec/tcpm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/ty

Re: [PATCH v2 02/14] staging: typec: tcpm: Add get_current_limit tcpc_dev callback

2017-08-16 Thread Guenter Roeck
ction. This commit adds an optional get_current_limit tcpc_dev callback which allows the port-controller to provide current-limit detection for when the CC pin is pulled up with Rp. Signed-off-by: Hans de Goede Reviewed-by: Guenter Roeck --- Changes in v2: -s/get_usb2_current_limit/get_current_

Re: [PATCH 2/2] staging: typec: tcpm: explicit_contract is always established

2017-08-15 Thread Guenter Roeck
Jagan Sridharan Reviewed-by: Guenter Roeck --- drivers/staging/typec/tcpm.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c index a24e6bbb909c..3e12cf101311 100644 --- a/drivers/staging/typec/tcpm.c

Re: [PATCH 1/2] staging: typec: tcpm: Report right typec_pwr_opmode

2017-08-15 Thread Guenter Roeck
-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck --- drivers/staging/typec/tcpm.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c index 20eb4ebcf8c3..a24e6bbb909c 100644 --- a

[PATCH 7/7] staging: typec: tcpm: Check cc status before entering SRC_TRY_DEBOUCE

2017-08-10 Thread Guenter Roeck
. The port must enter SRC_TRY_DEBOUNCE only if the CC state is TYPEC_CC_RD. Signed-off-by: Badhri Jagan Sridharan [groeck: Wording] Signed-off-by: Guenter Roeck --- drivers/staging/typec/tcpm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/typec/tcpm.c b/drivers

[PATCH 1/7] staging: typec: tcpm: Constify alternate modes

2017-08-10 Thread Guenter Roeck
Constify alternate mode configuration data which won't be touched by the driver. Signed-off-by: Guenter Roeck --- This series has been in my queue and kind of got lost. Sorry for the delay. drivers/staging/typec/tcpm.c | 2 +- drivers/staging/typec/tcpm.h | 2 +- 2 files changed, 2 inser

[PATCH 5/7] staging: typec: tcpm: Add timeout when waiting for role swap completion

2017-08-10 Thread Guenter Roeck
The Type-C protocol manager state machine could fail, which might result in role swap requests from user space to hang forever. Add a generous timeout when waiting for role swaps to complete to avoid this situation. Originally-from: Badhri Jagan Sridharan Signed-off-by: Guenter Roeck

[PATCH 4/7] staging: typec: tcpm: Select default state based on port type

2017-08-10 Thread Guenter Roeck
ACHED TYPEC_PORT_DFP - SRC_UNATTACHED TYPEC_PORT_DRP - based on the preferred_role setting Signed-off-by: Badhri Jagan Sridharan [groeck: Reworded description; minor formatting changes] Signed-off-by: Guenter Roeck --- drivers/staging/typec/tcpm.c | 15 ++- 1 file changed, 10 insertions(

[PATCH 6/7] staging: typec: tcpm: Improve role swap with non PD capable partners

2017-08-10 Thread Guenter Roeck
. This new state is mostly identical to ERROR_RECOVERY, only it does not cause a pending role change to fail. Use this new state also when initializing the driver. Rename ERROR_RECOVERY_WAIT_OFF to PORT_RESET_WAIT_OFF to better reflect its new meaning. Signed-off-by: Guenter Roeck --- drivers

[PATCH 2/7] staging: typec: tcpm: Report role swap complete after entering READY state

2017-08-10 Thread Guenter Roeck
: Guenter Roeck --- drivers/staging/typec/tcpm.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c index 06c49873df8e..be2a91b52d69 100644 --- a/drivers/staging/typec/tcpm.c +++ b/drivers/staging/typec/tcpm.c

[PATCH 3/7] staging: typec: tcpm: Set default state after error recovery based on port type

2017-08-10 Thread Guenter Roeck
. Signed-off-by: Badhri Jagan Sridharan Signed-off-by: Guenter Roeck --- drivers/staging/typec/tcpm.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c index be2a91b52d69..e7873286b5ea 100644 --- a/drivers/staging/typec

Re: [PATCH 10/18] staging: typec: fusb302: Add support for fcs,vbus-regulator-name device-property

2017-08-06 Thread Guenter Roeck
On 08/06/2017 07:52 AM, Hans de Goede wrote: Hi, On 06-08-17 16:30, Guenter Roeck wrote: On 08/06/2017 05:35 AM, Hans de Goede wrote: On devicetree platforms the fusb302 dt-node will have a vbus regulator property with a phandle to the regulator. On ACPI platforms, there are no phandles and

Re: [PATCH 08/18] staging: typec: fusb302: Add support for USB2 charger detection through extcon

2017-08-06 Thread Guenter Roeck
On 08/06/2017 07:36 AM, Hans de Goede wrote: Hi, On 06-08-17 16:22, Guenter Roeck wrote: On 08/06/2017 05:35 AM, Hans de Goede wrote: The fusb302 port-controller relies on an external device doing USB2 charger-type detection. The Intel Whiskey Cove PMIC with which the fusb302 is combined on

Re: [PATCH 01/18] staging: typec: tcpm: Add get_usb2_current_limit tcpc_dev callback

2017-08-06 Thread Guenter Roeck
On 08/06/2017 07:29 AM, Hans de Goede wrote: Hi, On 06-08-17 16:18, Guenter Roeck wrote: On 08/06/2017 05:35 AM, Hans de Goede wrote: A Rp signalling the default current limit indicates that we're possibly connected to an USB2 power-source. In some cases the type-c port-controller may pr

Re: [PATCH 04/18] staging: typec: tcpm: Add helpers for exporting current-limit through a psy

2017-08-06 Thread Guenter Roeck
On 08/06/2017 07:21 AM, Hans de Goede wrote: Hi, On 06-08-17 16:13, Guenter Roeck wrote: On 08/06/2017 05:35 AM, Hans de Goede wrote: Not all type-c port-controller can control the current-limit directly, in cases where the current limit can not be controlled directly it needs to be exported

Re: [PATCH 18/18] i2c-cht-wc: Add device-properties for fusb302 integration

2017-08-06 Thread Guenter Roeck
On 08/06/2017 05:35 AM, Hans de Goede wrote: Add device-properties to make the bq24292i controller connected to the bus get its input-current-limit from the fusb302 Type-C port controller which is used on boards with the cht-wc PMIC. Signed-off-by: Hans de Goede --- drivers/i2c/busses/Kconfig

Re: [PATCH 11/18] power: supply: Fix power_supply_am_i_supplied to return -ENODEV when apropriate

2017-08-06 Thread Guenter Roeck
On 08/06/2017 05:35 AM, Hans de Goede wrote: Commit 2848e039c562 ("power: supply: Make power_supply_am_i_supplied return -ENODEV if there are no suppliers") was supposed to make power_supply_am_i_supplied() return -ENODEV when there are no supplies which supply the supply passed to it. But inste

Re: [PATCH 10/18] staging: typec: fusb302: Add support for fcs,vbus-regulator-name device-property

2017-08-06 Thread Guenter Roeck
On 08/06/2017 05:35 AM, Hans de Goede wrote: On devicetree platforms the fusb302 dt-node will have a vbus regulator property with a phandle to the regulator. On ACPI platforms, there are no phandles and we need to get the vbus by a system wide unique name. Add support for a new "fcs,vbus-regulat

Re: [PATCH 09/18] staging: typec: fusb302: Use tcpm_set_current_limit_psy

2017-08-06 Thread Guenter Roeck
On 08/06/2017 05:35 AM, Hans de Goede wrote: Register a power_supply and use tcpm_set_current_limit_psy as set_current_limit so that another driver (e.g. the charger driver) can pick the limit up and configure the system accordingly. Signed-off-by: Hans de Goede --- drivers/staging/typec/fusb

Re: [PATCH 08/18] staging: typec: fusb302: Add support for USB2 charger detection through extcon

2017-08-06 Thread Guenter Roeck
On 08/06/2017 05:35 AM, Hans de Goede wrote: The fusb302 port-controller relies on an external device doing USB2 charger-type detection. The Intel Whiskey Cove PMIC with which the fusb302 is combined on some X86/ACPI platforms already has a charger-type detection driver which uses extcon to comm

Re: [PATCH 01/18] staging: typec: tcpm: Add get_usb2_current_limit tcpc_dev callback

2017-08-06 Thread Guenter Roeck
On 08/06/2017 05:35 AM, Hans de Goede wrote: A Rp signalling the default current limit indicates that we're possibly connected to an USB2 power-source. In some cases the type-c port-controller may provide the capability to detect the current-limit for USB2 power-sources (through e.g. BC1.2 detect

Re: [PATCH 04/18] staging: typec: tcpm: Add helpers for exporting current-limit through a psy

2017-08-06 Thread Guenter Roeck
On 08/06/2017 05:35 AM, Hans de Goede wrote: Not all type-c port-controller can control the current-limit directly, in cases where the current limit can not be controlled directly it needs to be exported so that another driver (e.g. the charger driver) can pick the limit up and configure the syst

Re: [PATCH 02/18] staging: typec: tcpm: Add extcon helper functions for USB2 current limit detect

2017-08-06 Thread Guenter Roeck
ore(jiffies, timeout)); + + return current_limit; +} +EXPORT_SYMBOL_GPL(tcpm_get_usb2_current_limit_extcon); + Not really sure about this one. Should it be part of low level drivers ? Guenter MODULE_AUTHOR("Guenter Roeck "); MODULE_DESCRIPTION("USB Type-C Port Manager&q

Re: [PATCH 06/18] staging: typec: fusb302: Get max snk mv/ma/mw from device-properties

2017-08-06 Thread Guenter Roeck
lace the "fcs,max-snk-mv", "fcs,max-snk-ma", + "fcs,max-snk-mw" and "fcs,operating-snk-mw" device(tree) properties with + properties which are part of a generic type-c controller devicetree binding. + I think preferred units would be -microvolt, -,icroamp

Re: New Driver for electrical energy measurement

2017-07-14 Thread Guenter Roeck
On 07/14/2017 01:07 AM, Jonathan Cameron wrote: On Wed, 12 Jul 2017 15:19:40 +0200 Christian Gromm wrote: On Wed, 12 Jul 2017 14:51:01 +0200 Greg KH wrote: On Wed, Jul 12, 2017 at 02:18:54PM +0200, Christian Gromm wrote: Hi, Microchip is planning to introduce a driver for a new companion

Re: [PATCH v3] staging: typec: Fix endianness warning discovered by sparse

2017-07-07 Thread Guenter Roeck
019:49: warning: incorrect type in assignment (different base > types) > typec/tcpm.c:1019:49:expected unsigned int [unsigned] [usertype] > typec/tcpm.c:1019:49:got restricted __le32 [usertype] > > Signed-off-by: Thomas Gardner Reviewed-by: Guenter Roeck > --- > drive

Re: [PATCH v2] staging: typec: Fix endianness warning discovered by sparse

2017-07-06 Thread Guenter Roeck
On 07/06/2017 03:54 PM, Thomas Gardner wrote: The below warning is resolved by removing the cpu_to_le32() call. This call was redundant; vdm_run_state_machine() ensures that SVDM responses have the correct endianness before sending. typec/tcpm.c:1019:49: warning: incorrect type in assignment (di

Re: [PATCH] staging: typec: Fix type mismatch found with sparse

2017-07-06 Thread Guenter Roeck
On 07/05/2017 07:57 PM, Thomas Gardner wrote: Guenter Roeck / 2017-07-05T07:25-0700 On 07/05/2017 07:00 AM, Thomas Gardner wrote: The warning below is resolved by casting the LHS to __le32. typec/tcpm.c:1019:49: warning: incorrect type in assignment (different base types) typec/tcpm.c:1019

Re: [PATCH] staging: typec: Fix type mismatch found with sparse

2017-07-05 Thread Guenter Roeck
On 07/05/2017 07:00 AM, Thomas Gardner wrote: The warning below is resolved by casting the LHS to __le32. typec/tcpm.c:1019:49: warning: incorrect type in assignment (different base types) typec/tcpm.c:1019:49:expected unsigned int [unsigned] [usertype] typec/tcpm.c:1019:49:got restric

Re: [PATCH 2/3] staging: typec: add tcpci_read16_le.

2017-06-19 Thread Guenter Roeck
On 06/19/2017 03:11 AM, ? ? wrote: From: Pan Li Add tcpci_read16_le for pd_message header type __le16. > Signed-off-by: Pan Li --- drivers/staging/typec/tcpci.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/staging/typec/tcpci.c b/drivers/stagi

Re: [PATCH] staging: fusb302: don't bitshift __le16 type

2017-06-16 Thread Guenter Roeck
27;re > filling the buffer, we can just copy the contents right away. As an > added benefit we don't get fishy results on big endian systems anymore. > > Signed-off-by: Frans Klaver Reviewed-by: Guenter Roeck > --- > drivers/staging/typec/fusb302/fusb302.c | 4 ++-- >

  1   2   3   >