RE: [PATCH v2 3/3] usb: typec: fusb302: Revert "Resolve fixed power role contract setup"

2019-04-17 Thread Adam Thomson
riginal functionality is fully restored. > > Fixes: ea3b4d5523bc ("usb: typec: fusb302: Resolve fixed power role ...") > Cc: Adam Thomson > Signed-off-by: Hans de Goede For DRP & Sink only toggling scenarios, with FUSB302 TCPC: Tested-by: Adam Thomson > --- > Ch

RE: [PATCH v2 2/3] usb: typec: fusb302: Implement start_toggling for all port-types

2019-04-17 Thread Adam Thomson
port-types, so that connection-detection works > on single-role ports too. > > Fixes: ea3b4d5523bc("usb: typec: fusb302: Resolve fixed power role ...") > Cc: Adam Thomson > Signed-off-by: Hans de Goede For DRP & Sink only toggling scenarios, with FUSB302 TCPC: Tes

RE: [PATCH v2 1/3] usb: typec: tcpm: Notify the tcpc to start connection-detection for SRPs

2019-04-17 Thread Adam Thomson
ut also get a port_type check added and return -EOPNOTSUPP when port_type > is not DRP. > > Fixes: ea3b4d5523bc("usb: typec: fusb302: Resolve fixed power role ...") > Cc: Adam Thomson > Signed-off-by: Hans de Goede For DRP & Sink only toggling scenarios, with FUS

RE: [PATCH 1/3] usb: typec: tcpm: Add start_srp_connection_detect callback

2019-04-15 Thread Adam Thomson
On 15 April 2019 11:38, Hans de Goede wrote: > On 15-04-19 12:31, Adam Thomson wrote: > > On 13 April 2019 21:40, Hans de Goede wrote: > > > >> Some tcpc device-drivers need to explicitly be told to watch for > >> connection events, otherwise the tcpc will not gen

RE: [PATCH 1/3] usb: typec: tcpm: Add start_srp_connection_detect callback

2019-04-15 Thread Adam Thomson
erated. > > This commit adds a new start_srp_connection_detect callback to tcpc_dev and > when this is implemented calls this in place of start_drp_toggling for SRP > devices. > > Fixes: ea3b4d5523bc("usb: typec: fusb302: Resolve fixed power role ...") > Cc: Adam Thomso

RE: [PATCH] usb: typec: tcpm: Export partner Source Capabilities

2019-02-14 Thread Adam Thomson
On 14 February 2019 14:30, Greg KH wrote: > On Thu, Feb 14, 2019 at 02:17:14PM +0000, Adam Thomson wrote: > > On 12 February 2019 16:20, Guenter Roeck wrote: > > > > > On 2/12/19 2:54 AM, Greg KH wrote: > > > > On Tue, Feb 12, 2019 at 06:29:39PM +0800, Kyl

RE: [PATCH] usb: typec: tcpm: Export partner Source Capabilities

2019-02-14 Thread Adam Thomson
On 12 February 2019 16:20, Guenter Roeck wrote: > On 2/12/19 2:54 AM, Greg KH wrote: > > On Tue, Feb 12, 2019 at 06:29:39PM +0800, Kyle Tso wrote: > >> On Thu, Jan 31, 2019 at 3:02 PM Greg KH > wrote: > >> > >>> On Thu, Jan 31, 2019 at 11:54:11AM +0800, Kyle Tso wrote: > Provide a function t

RE: [PATCH] usb: typec: tcpm: Correct the PPS out_volt calculation

2019-01-30 Thread Adam Thomson
sted to see how many Sources go off-piste like that with a more unusual PPS range, especially when the default fixed is 5V, and they're required to support one of the defined PPS ranges which will start at 3.3V. Not sure what this might gain you. However, spec says it's possible so: Revi

RE: [PATCH v3] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-17 Thread Adam Thomson
um operational voltage times the >maximum current defined in the selected Source PDO d. Select the Source PDO > with the highest maximum power > > Signed-off-by: Kyle Tso Acked-by: Adam Thomson > > --- > Changelog since v1: > - updated the commit message as sugges

RE: [PATCH] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-17 Thread Adam Thomson
On 17 December 2018 12:45, Kyle Tso wrote: > On Mon, Dec 17, 2018 at 8:23 PM Adam Thomson > wrote: > > > > On 17 December 2018 02:48, Kyle Tso wrote: > > > > > Current matching rules ensure that the voltage range of selected > > > Source Capability is e

RE: [PATCH] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-17 Thread Adam Thomson
On 17 December 2018 02:48, Kyle Tso wrote: > Current matching rules ensure that the voltage range of selected Source > Capability is entirely within the range defined in one of the Sink > Capabilities. This > is reasonable but not practical because Sink may not support wide range of > voltage whe

RE: [PATCH] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-12 Thread Adam Thomson
On 12 December 2018 02:47, Kyle Tso wrote: > On Mon, Dec 10, 2018 at 7:36 PM Adam Thomson > wrote: > > > > On 10 December 2018 09:01, Adam Thomson wrote: > > > > > On 06 December 2018 03:02, Kyle Tso wrote: > > > > > > > Current ma

RE: [PATCH] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-10 Thread Adam Thomson
On 10 December 2018 09:01, Adam Thomson wrote: > On 06 December 2018 03:02, Kyle Tso wrote: > > > Current matching rules ensure that the voltage range of selected > > Source Capability is entirely within the range defined in one of the > > Sink Capabilities. This is reas

RE: [PATCH] usb: typec: tcpm: Extend the matching rules on PPS APDO selection

2018-12-10 Thread Adam Thomson
On 06 December 2018 03:02, Kyle Tso wrote: > Current matching rules ensure that the voltage range of selected Source > Capability is entirely within the range defined in one of the Sink > Capabilities. This > is reasonable but not practical because Sink may not support wide range of > voltage whe

[PATCH v2] usb: typec: tcpm: Report back negotiated PPS voltage and current

2018-10-08 Thread Adam Thomson
out due to not using valid PPS units of voltage and current. Signed-off-by: Adam Thomson --- Changes are based on usb-testing (e7a2c3fa2857) Changes in v2: - Rounding down of PPS voltage and current values moved to relevant API functions so stored values are correctly updated prior to all

RE: [PATCH] usb: typec: tcpm: Report back negotiated PPS voltage and current

2018-09-28 Thread Adam Thomson
On 28 September 2018 17:04, Guenter Roeck wrote: > On Fri, Sep 28, 2018 at 04:33:49PM +0100, Adam Thomson wrote: > > Currently when requesting a specific voltage or current through > > the psy interface, for PPS, when reading back from that interface > > the values will

[PATCH] usb: typec: tcpm: Report back negotiated PPS voltage and current

2018-09-28 Thread Adam Thomson
out due to not using valid PPS units of voltage and current. Signed-off-by: Adam Thomson --- Changes are based on usb-testing (ae8a2ca8a221) drivers/usb/typec/tcpm/tcpm.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index

[PATCH 1/2] usb: typec: fusb302: Correct spelling mistake for toggling state

2018-09-26 Thread Adam Thomson
There's a typo in the enum name of the 'OFF' state for toggling (TOGGLINE instead of TOGGLING). This commit resolves that trivial spelling inconsistency. Signed-off-by: Adam Thomson --- drivers/usb/typec/tcpm/fusb302.c | 12 ++-- 1 file changed, 6 insertions(+), 6 del

[PATCH 0/2] usb: typec: fusb302: Resolve fixed role power configuration

2018-09-26 Thread Adam Thomson
toggling state for the device is corrected. Changes are based on usb-testing (ae8a2ca8a221) Adam Thomson (2): usb: typec: fusb302: Correct spelling mistake for toggling state usb: typec: fusb302: Resolve fixed power role contract setup drivers/usb/typec/tcpm/fusb302.c | 36

[PATCH 2/2] usb: typec: fusb302: Resolve fixed power role contract setup

2018-09-26 Thread Adam Thomson
g a contract to be established. Signed-off-by: Adam Thomson --- drivers/usb/typec/tcpm/fusb302.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/typec/tcpm/fusb302.c index fd851d8..43b64d9 100644 --- a/drivers/usb/typec

[PATCH] usb: typec: tcpm: Fix APDO PPS order checking to be based on voltage

2018-09-21 Thread Adam Thomson
: 2eadc33f40d4 ("typec: tcpm: Add core support for sink side PPS") Cc: Signed-off-by: Adam Thomson --- Code based on usb-testing branch (ae8a2ca8a2215c7e31e6d874f7303801bb15fbb) drivers/usb/typec/tcpm/tcpm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/

RE: [PATCH v2 1/3] dt-bindings: connector: Add support for USB-PD PPS APDOs to bindings

2018-09-11 Thread Adam Thomson
On 11 September 2018 15:35, Heikki Krogerus wrote: > Hi Adam, > > On Mon, Sep 10, 2018 at 01:24:26PM +0100, Adam Thomson wrote: > > Add support for PPS APDOs to connector bindings so a port controller > > can specify support for PPS, as per existing FIXED/BATT/VAR PDOs.

RE: [PATCH 0/3] *** SUBJECT HERE ***

2018-09-10 Thread Adam Thomson
On 10 September 2018 13:19, Adam Thomson wrote: > This patch set adds DT bindings support for PPS APDOs, and updates the FUSB302 > to use the generic connector bindings allowing for PPS support in this Type-C > port controller. Existing FUSB302 device specific bindings still work, but

[PATCH 0/3] *** SUBJECT HERE ***

2018-09-10 Thread Adam Thomson
. Changes in v2: - Added Reviewed-by tags to patches - Rebase code against latest usb-next branch (v4.19-rc2) Adam Thomson (3): dt-bindings: connector: Add support for USB-PD PPS APDOs to bindings dt-bindings: usb: fusb302: Use usb-connector bindings for configuration usb

[PATCH 2/3] dt-bindings: usb: fusb302: Use usb-connector bindings for configuration

2018-09-10 Thread Adam Thomson
stead to achieve the required port config. Signed-off-by: Adam Thomson Reviewed-by: Rob Herring --- .../devicetree/bindings/usb/fcs,fusb302.txt| 32 +- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/fcs,fusb302.

[PATCH 3/3] usb: typec: fusb302: Populate tcpc fwnode for TCPM property handling

2018-09-10 Thread Adam Thomson
This update populates the tcpc handle's fwnode pointer with the child usb-connector node, if it exists, so that TCPM can perform generic property handling to define the ports capabilities. Signed-off-by: Adam Thomson Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- driver

[PATCH 1/3] dt-bindings: connector: Add support for USB-PD PPS APDOs to bindings

2018-09-10 Thread Adam Thomson
Add support for PPS APDOs to connector bindings so a port controller can specify support for PPS, as per existing FIXED/BATT/VAR PDOs. Signed-off-by: Adam Thomson Reviewed-by: Rob Herring --- .../bindings/connector/usb-connector.txt | 8 +++ include/dt-bindings/usb/pd.h

RE: fusb302 type-c chip driver supply cutting out

2018-08-02 Thread Adam Thomson
On 01 August 2018 19:38, Tim Harvey wrote: > On Tue, Jul 31, 2018 at 2:22 AM Adam Thomson > wrote: > > > > On 27 July 2018 17:41, Tim Harvey wrote: > > > > Adding Guenter to the thread. > > > > > Greetings, > > > > > > I have a custo

RE: fusb302 type-c chip driver supply cutting out

2018-07-31 Thread Adam Thomson
On 27 July 2018 17:41, Tim Harvey wrote: Adding Guenter to the thread. > Greetings, > > I have a custom design with a Fairchild FUSB302 Type-C chip driver > that I'm testing with Linux 4.17 and a BTI AC-60TC 60W charger. For > this design we are using Type-C as a power/charger input only - no >

RE: [PATCH 4.18 REGRESSION fix 2/2] i2c-cht-wc: Fix bq24190 supplier

2018-07-02 Thread Adam Thomson
On 02 July 2018 11:51, Hans de Goede wrote: > Hi, > > On 02-07-18 12:34, Adam Thomson wrote: > > On 01 July 2018 10:49, Hans de Goede wrote: > > > >> Commit f2a8aa053c17 ("typec: tcpm: Represent source supply through > >> power_supply") moved

RE: [PATCH 4.18 REGRESSION fix 2/2] i2c-cht-wc: Fix bq24190 supplier

2018-07-02 Thread Adam Thomson
the generic tcpm code. > > This has caused the power-supply registered by the fusb302 driver, > which determines how much current the bq24190 can draw, to change name > from "fusb302-typec-source" to "tcpm-source-psy-i2c-fusb302". > > Fixes: f2a8aa053c17 ("typ

RE: [PATCH 4.18 REGRESSION fix 1/2] typec: tcpm: Correctly report power_supply current and voltage for non pd supply

2018-07-02 Thread Adam Thomson
mit > from tcpm_reset_port() as that calls tcpm_set_current_limit(0, 0) > which now already sets these to 0. > > Fixes: f2a8aa053c17 ("typec: tcpm: Represent source supply through...") > Cc: Adam Thomson > Signed-off-by: Hans de Goede Apologies for this, and thanks

RE: [PATCH v8 06/14] usb: typec: tcpm: support get typec and pd config from device properties

2018-06-27 Thread Adam Thomson
On 27 June 2018 00:45, Li Jun wrote: > This patch adds support of get typec and power delivery config from > firmware description. > > Reviewed-by: Heikki Krogerus > Reviewed-by: Guenter Roeck > Signed-off-by: Li Jun Acked-by: Adam Thomson > --- > driver

RE: [PATCH v7 06/14] usb: typec: tcpm: support get typec and pd config from device properties

2018-06-25 Thread Adam Thomson
On 25 June 2018 09:09, Li Jun wrote: > This patch adds support of get typec and power delivery config from > firmware description. > > Reviewed-by: Heikki Krogerus > Reviewed-by: Guenter Roeck > Signed-off-by: Li Jun > --- > drivers/usb/typec/tcpm.c | 132 +

[PATCH 2/2] typec: tcpm: Provide fwnode pointer as part of psy_cfg

2018-05-22 Thread Adam Thomson
k for ACPI platforms when the relevant support is added to the power_supply core. Signed-off-by: Adam Thomson Suggested-by: Heikki Krogerus --- drivers/usb/typec/tcpm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 72996cc..0ccd2ce 10

[PATCH 0/2] typec: tcpm: Populate fwnode for use in power_supply core

2018-05-22 Thread Adam Thomson
now the main FW support in the psy core is still just DT based but in the future ACPI will likely be added and can use this field. Adam Thomson (2): power: supply: Add fwnode pointer to power_supply_config struct typec: tcpm: Provide fwnode pointer as part of psy_cfg drivers/power/supply

[PATCH 1/2] power: supply: Add fwnode pointer to power_supply_config struct

2018-05-22 Thread Adam Thomson
will automatically resolve down to of_node on platforms which support it, otherwise it will be NULL. In the future, when ACPI support is added, this can be modified to accommodate ACPI without the need to change calling code which already provides the fwnode handle in this manner. Signed-off-by: Adam

RE: [PATCH] typec: tcpm: Provide of_node pointer as part of psy_cfg

2018-05-21 Thread Adam Thomson
On 21 May 2018 15:56, Heikki Krogerus wrote: > On Mon, May 21, 2018 at 01:58:16PM +0000, Adam Thomson wrote: > > Hi Heikki, > > > > On 21 May 2018 14:20, Heikki Krogerus wrote: > > > > > On Wed, May 16, 2018 at 05:00:46PM +0100, Adam Thomson wrote: > > &g

RE: [PATCH] typec: tcpm: Provide of_node pointer as part of psy_cfg

2018-05-21 Thread Adam Thomson
Hi Heikki, On 21 May 2018 14:20, Heikki Krogerus wrote: > On Wed, May 16, 2018 at 05:00:46PM +0100, Adam Thomson wrote: > > For supply registration, provide of_node pointer of the port device, > > via the power_supply_config structure, to allow other psy drivers > > to add u

[PATCH] typec: tcpm: Provide of_node pointer as part of psy_cfg

2018-05-16 Thread Adam Thomson
For supply registration, provide of_node pointer of the port device, via the power_supply_config structure, to allow other psy drivers to add us as a supplier using the 'power-supplies' DT property. Signed-off-by: Adam Thomson --- drivers/usb/typec/tcpm.c | 1 + 1 file changed, 1

RE: [PATCH] typec: tcpm: Fix incorrect 'and' operator

2018-04-30 Thread Adam Thomson
typec: tcpm: Add support for sink PPS related > messages") > Signed-off-by: Gustavo A. R. Silva > --- Good spot. :( Acked-by: Adam Thomson > drivers/usb/typec/tcpm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/typec/tcpm.c

RE: [PATCH v8 0/6] typec: tcpm: Add sink side support for PPS

2018-04-25 Thread Adam Thomson
On 25 April 2018 13:31, Greg Kroah-Hartman wrote: > On Wed, Apr 25, 2018 at 01:26:33AM +0200, Sebastian Reichel wrote: > > Hi Greg, > > > > On Tue, Apr 24, 2018 at 03:57:49PM +0200, Greg Kroah-Hartman wrote: > > > On Mon, Apr 23, 2018 at 03:10:55PM +0100, Adam Tho

[PATCH v8 1/6] typec: tcpm: Add core support for sink side PPS

2018-04-23 Thread Adam Thomson
This commit adds code to handle requesting of PPS APDOs. Switching between standard PDOs and APDOs, and re-requesting an APDO to modify operating voltage/current will be triggered by an external call into TCPM. Signed-off-by: Adam Thomson Acked-by: Heikki Krogerus Reviewed-by: Guenter Roeck

[PATCH v8 2/6] Documentation: power: Initial effort to document power_supply ABI

2018-04-23 Thread Adam Thomson
This commit adds generic ABI information regarding power_supply properties. This is an initial attempt to try and align the usage of these properties between drivers. As part of this commit, common Battery and USB related properties have been listed. Signed-off-by: Adam Thomson

[PATCH v8 0/6] typec: tcpm: Add sink side support for PPS

2018-04-23 Thread Adam Thomson
d power_supply 'type' property update for PPS addition - Added 'connected_type' property to power_supply framework, to support supplies which can report multiple connected types (e.g. USB), as discussed with Heikki. Changes in v2: - Use USB_PD and usb_pd prefixes for ma

[PATCH v8 3/6] power: supply: Add error checking of psy desc during registration

2018-04-23 Thread Adam Thomson
it updates the registration code to add some basic checks on the desc pointer validity, name, and presence of properties. Signed-off-by: Adam Thomson --- drivers/power/supply/power_supply_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/power/supply/power_supply_core.c b/dri

[PATCH v8 6/6] typec: tcpm: Add support for sink PPS related messages

2018-04-23 Thread Adam Thomson
ndled. Signed-off-by: Adam Thomson Acked-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drivers/usb/typec/tcpm.c | 143 --- 1 file changed, 134 insertions(+), 9 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 75

[PATCH v8 4/6] power: supply: Add 'usb_type' property and supporting code

2018-04-23 Thread Adam Thomson
e 'usb_type' enum contains all of the USB variant types that exist for the 'type' enum at this time, and in addition has SDP and PPS types. The mirroring is intentional so as to not impact existing usage of the 'type' property. Signed-off-by: Adam Thomson

[PATCH v8 5/6] typec: tcpm: Represent source supply through power_supply

2018-04-23 Thread Adam Thomson
pply class' Signed-off-by: Adam Thomson Reviewed-by: Guenter Roeck --- drivers/usb/typec/Kconfig | 1 + drivers/usb/typec/fusb302/Kconfig | 2 +- drivers/usb/typec/fusb302/fusb302.c | 63 + drivers/usb/typec/tcpm.c| 251 ++

RE: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS

2018-04-23 Thread Adam Thomson
On 23 April 2018 12:28, Greg Kroah-Hartman wrote: > On Mon, Apr 23, 2018 at 11:06:25AM +0000, Adam Thomson wrote: > > On 23 April 2018 09:25, Greg Kroah-Hartman wrote: > > > > > On Mon, Apr 23, 2018 at 07:49:38AM +, Adam Thomson wrote: > > > > On 22

RE: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS

2018-04-23 Thread Adam Thomson
On 23 April 2018 09:25, Greg Kroah-Hartman wrote: > On Mon, Apr 23, 2018 at 07:49:38AM +0000, Adam Thomson wrote: > > On 22 April 2018 21:58, Adam Thomson wrote: > > > > > On 22 April 2018 15:05, Greg Kroah-Hartman wrote: > > > > > > > On Fri, Mar 23,

RE: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS

2018-04-23 Thread Adam Thomson
On 22 April 2018 21:58, Adam Thomson wrote: > On 22 April 2018 15:05, Greg Kroah-Hartman wrote: > > > On Fri, Mar 23, 2018 at 10:12:20AM +, Adam Thomson wrote: > > > This commit adds code to handle requesting of PPS APDOs. Switching > > > between standard PDOs a

RE: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS

2018-04-22 Thread Adam Thomson
On 22 April 2018 15:05, Greg Kroah-Hartman wrote: > On Fri, Mar 23, 2018 at 10:12:20AM +0000, Adam Thomson wrote: > > This commit adds code to handle requesting of PPS APDOs. Switching > > between standard PDOs and APDOs, and re-requesting an APDO to > > modify operating vo

RE: [PATCH v7 2/6] Documentation: power: Initial effort to document power_supply ABI

2018-03-26 Thread Adam Thomson
On 26 March 2018 10:57, Greg Kroah-Hartman wrote: > On Fri, Mar 23, 2018 at 10:12:21AM +0000, Adam Thomson wrote: > > This commit adds generic ABI information regarding power_supply > > properties. This is an initial attempt to try and align the usage > > of these propertie

[PATCH v7 0/6] typec: tcpm: Add sink side support for PPS

2018-03-23 Thread Adam Thomson
as discussed with Heikki. Changes in v2: - Use USB_PD and usb_pd prefixes for macros and inline functions in headers. - Negotiate spec revision of PD headers during initial contract agreement. - New headers now use SPDX tags for referencing correct license. NOTE: Code changes based on usb

[PATCH v7 2/6] Documentation: power: Initial effort to document power_supply ABI

2018-03-23 Thread Adam Thomson
This commit adds generic ABI information regarding power_supply properties. This is an initial attempt to try and align the usage of these properties between drivers. As part of this commit, common Battery and USB related properties have been listed. Signed-off-by: Adam Thomson

[PATCH v7 6/6] typec: tcpm: Add support for sink PPS related messages

2018-03-23 Thread Adam Thomson
ndled. Signed-off-by: Adam Thomson Acked-by: Heikki Krogerus --- drivers/usb/typec/tcpm.c | 143 --- 1 file changed, 134 insertions(+), 9 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 57a7d1a..7025a16 100644 --- a/driver

[PATCH v7 5/6] typec: tcpm: Represent source supply through power_supply

2018-03-23 Thread Adam Thomson
pply class' Signed-off-by: Adam Thomson --- drivers/usb/typec/Kconfig | 1 + drivers/usb/typec/fusb302/Kconfig | 2 +- drivers/usb/typec/fusb302/fusb302.c | 63 +- drivers/usb/typec/tcpm.c| 245 +++- 4 files changed, 248 in

[PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS

2018-03-23 Thread Adam Thomson
This commit adds code to handle requesting of PPS APDOs. Switching between standard PDOs and APDOs, and re-requesting an APDO to modify operating voltage/current will be triggered by an external call into TCPM. Signed-off-by: Adam Thomson Acked-by: Heikki Krogerus --- drivers/usb/typec/tcpm.c

[PATCH v7 3/6] power: supply: Add error checking of psy desc during registration

2018-03-23 Thread Adam Thomson
it updates the registration code to add some basic checks on the desc pointer validity, name, and presence of properties. Signed-off-by: Adam Thomson --- drivers/power/supply/power_supply_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/power/supply/power_supply_core.c b/dri

[PATCH v7 4/6] power: supply: Add 'usb_type' property and supporting code

2018-03-23 Thread Adam Thomson
e 'usb_type' enum contains all of the USB variant types that exist for the 'type' enum at this time, and in addition has SDP and PPS types. The mirroring is intentional so as to not impact existing usage of the 'type' property. Signed-off-by: Adam Thomson

[PATCH v6 1/6] typec: tcpm: Add core support for sink side PPS

2018-03-22 Thread Adam Thomson
This commit adds code to handle requesting of PPS APDOs. Switching between standard PDOs and APDOs, and re-requesting an APDO to modify operating voltage/current will be triggered by an external call into TCPM. Signed-off-by: Adam Thomson Acked-by: Heikki Krogerus --- drivers/usb/typec/tcpm.c

[PATCH v6 3/6] power: supply: Add error checking of psy desc during registration

2018-03-22 Thread Adam Thomson
it updates the registration code to add some basic checks on the desc pointer validity, name, and presence of properties. Signed-off-by: Adam Thomson --- drivers/power/supply/power_supply_core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/power/supply/power_supply_core.c b/dri

[PATCH v6 2/6] Documentation: power: Initial effort to document power_supply ABI

2018-03-22 Thread Adam Thomson
This commit adds generic ABI information regarding power_supply properties. This is an initial attempt to try and align the usage of these properties between drivers. As part of this commit, common Battery and USB related properties have been listed. Signed-off-by: Adam Thomson

[PATCH v6 5/6] typec: tcpm: Represent source supply through power_supply

2018-03-22 Thread Adam Thomson
pply class' Signed-off-by: Adam Thomson --- drivers/usb/typec/Kconfig | 1 + drivers/usb/typec/fusb302/Kconfig | 2 +- drivers/usb/typec/fusb302/fusb302.c | 63 +- drivers/usb/typec/tcpm.c| 242 +++- 4 files changed, 245 in

[PATCH v6 4/6] power: supply: Add 'usb_type' property and supporting code

2018-03-22 Thread Adam Thomson
e 'usb_type' enum contains all of the USB variant types that exist for the 'type' enum at this time, and in addition has SDP and PPS types. The mirroring is intentional so as to not impact existing usage of the 'type' property. Signed-off-by: Adam Thomson

[PATCH v6 0/6] typec: tcpm: Add sink side support for PPS

2018-03-22 Thread Adam Thomson
b_pd prefixes for macros and inline functions in headers. - Negotiate spec revision of PD headers during initial contract agreement. - New headers now use SPDX tags for referencing correct license. NOTE: Code changes based on usb-next (027bd6cafd9a1e3a109b5e5682c85ac84e804a8d) Adam Thomson (6)

[PATCH v6 6/6] typec: tcpm: Add support for sink PPS related messages

2018-03-22 Thread Adam Thomson
ndled. Signed-off-by: Adam Thomson Acked-by: Heikki Krogerus --- drivers/usb/typec/tcpm.c | 143 --- 1 file changed, 134 insertions(+), 9 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index c859cba..fffe97d 100644 --- a/driver

RE: [PATCH v5 4/5] typec: tcpm: Represent source supply through power_supply

2018-03-22 Thread Adam Thomson
On 22 March 2018 04:09, Guenter Roeck wrote: > > +static int tcpm_psy_set_prop(struct power_supply *psy, > > +enum power_supply_property psp, > > +const union power_supply_propval *val) > > +{ > > + struct tcpm_port *port = power_supply_get_drvdata

RE: [PATCH v5 3/5] power: supply: Add 'usb_type' property and supporting code

2018-03-22 Thread Adam Thomson
On 22 March 2018 04:08, Guenter Roeck wrote: > > +static ssize_t power_supply_show_usb_type(struct device *dev, > > + enum power_supply_usb_type > *usb_types, > > + ssize_t num_usb_types, > > +

RE: [PATCH v5 1/5] typec: tcpm: Add core support for sink side PPS

2018-03-22 Thread Adam Thomson
On 22 March 2018 04:03, Guenter Roeck wrote: > > static enum pdo_err tcpm_caps_err(struct tcpm_port *port, const u32 *pdo, > > @@ -1308,6 +1347,26 @@ static enum pdo_err tcpm_caps_err(struct tcpm_port > *port, const u32 *pdo, > > pdo_min_voltage(pdo[i - 1]))

RE: [PATCH v5 5/5] typec: tcpm: Add support for sink PPS related messages

2018-03-22 Thread Adam Thomson
On 22 March 2018 03:53, Guenter Roeck wrote: > > +static void tcpm_pd_ext_msg_request(struct tcpm_port *port, > > + const struct pd_message *msg) > > +{ > > + enum pd_ext_msg_type type = pd_header_type_le(msg->header); > > + unsigned int data_size = pd_ext_header_

[PATCH v5 0/5] typec: tcpm: Add sink side support for PPS

2018-03-20 Thread Adam Thomson
nected types (e.g. USB), as discussed with Heikki. Changes in v2: - Use USB_PD and usb_pd prefixes for macros and inline functions in headers. - Negotiate spec revision of PD headers during initial contract agreement. - New headers now use SPDX tags for referencing correct license. NOTE: Cod

[PATCH v5 1/5] typec: tcpm: Add core support for sink side PPS

2018-03-20 Thread Adam Thomson
This commit adds code to handle requesting of PPS APDOs. Switching between standard PDOs and APDOs, and re-requesting an APDO to modify operating voltage/current will be triggered by an external call into TCPM. Signed-off-by: Adam Thomson Acked-by: Heikki Krogerus --- drivers/usb/typec/tcpm.c

[PATCH v5 3/5] power: supply: Add 'usb_type' property and supporting code

2018-03-20 Thread Adam Thomson
e 'usb_type' enum contains all of the USB variant types that exist for the 'type' enum at this time, and in addition has SDP and PPS types. The mirroring is intentional so as to not impact existing usage of the 'type' property. Signed-off-by: Adam Thomson Acked-by: Heikki

[PATCH v5 2/5] Documentation: power: Initial effort to document power_supply ABI

2018-03-20 Thread Adam Thomson
This commit adds generic ABI information regarding power_supply properties. This is an initial attempt to try and align the usage of these properties between drivers. As part of this commit, common Battery and USB related properties have been listed. Signed-off-by: Adam Thomson

[PATCH v5 4/5] typec: tcpm: Represent source supply through power_supply

2018-03-20 Thread Adam Thomson
pply class' Signed-off-by: Adam Thomson --- drivers/usb/typec/Kconfig | 1 + drivers/usb/typec/fusb302/Kconfig | 2 +- drivers/usb/typec/fusb302/fusb302.c | 63 +- drivers/usb/typec/tcpm.c| 242 +++- 4 files changed, 245 in

[PATCH v5 5/5] typec: tcpm: Add support for sink PPS related messages

2018-03-20 Thread Adam Thomson
ndled. Signed-off-by: Adam Thomson Acked-by: Heikki Krogerus --- drivers/usb/typec/tcpm.c | 152 --- 1 file changed, 143 insertions(+), 9 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 18ab36f..148db99 100644 --- a/driver

RE: [PATCH v4 0/7] typec: tcpm: Add sink side support for PPS

2018-03-19 Thread Adam Thomson
On 12 March 2018 08:33, Adam Thomson wrote: > On 09 March 2018 17:34, Greg Kroah-Hartman wrote: > > > On Tue, Jan 02, 2018 at 03:50:48PM +, Adam Thomson wrote: > > > This patch set adds sink side support for the PPS feature introduced in > > > the

RE: [PATCH v4 0/7] typec: tcpm: Add sink side support for PPS

2018-03-12 Thread Adam Thomson
On 09 March 2018 17:34, Greg Kroah-Hartman wrote: > On Tue, Jan 02, 2018 at 03:50:48PM +0000, Adam Thomson wrote: > > This patch set adds sink side support for the PPS feature introduced in the > > USB PD 3.0 specification. > > > > The source PPS supply is represe

RE: [PATCH 4.16 REGRESSION fix] Revert "typec: tcpm: Only request matching pdos"

2018-03-06 Thread Adam Thomson
g pdos" commit, > fixing the regression. > > Cc: Badhri Jagan Sridharan > Signed-off-by: Hans de Goede Thanks Hans. Sadly I alluded to this problem before the patch was pulled in but this was seemingly missed: https://lkml.org/lkml/2017/11/28/186 FWIW, Acked-by: Adam Thomso

RE: [PATCH v4 6/7] typec: tcpm: Represent source supply through power_supply class

2018-02-09 Thread Adam Thomson
On 08 February 2018 10:45, Heikki Krogerus wrote: Hi Heikki, Comments in-line as usual. Bit verbose, and may have stated the obvious in places, but trying to build a picture and aim for something sensible. > Hi Adam, > > On Tue, Feb 06, 2018 at 03:51:26PM +0000, Adam Thomson wrote:

RE: [PATCH v4 5/7] power: supply: Add 'connected_type' property and supporting code

2018-02-09 Thread Adam Thomson
On 09 February 2018 15:02, Sebastian Reichel wrote: > Hi, > > On Fri, Feb 09, 2018 at 11:28:42AM +0000, Adam Thomson wrote: > > On 08 February 2018 21:31, Sebastian Reichel wrote: > > > On Tue, Jan 02, 2018 at 03:50:53PM +, Adam Thomson wrote: > > > >

RE: [PATCH v4 5/7] power: supply: Add 'connected_type' property and supporting code

2018-02-09 Thread Adam Thomson
On 08 February 2018 21:31, Sebastian Reichel wrote: > Hi, > > On Tue, Jan 02, 2018 at 03:50:53PM +0000, Adam Thomson wrote: > > This commit adds the 'connected_type' property to represent supplies > > which can report a number of different types of supply

RE: [PATCH v4 6/7] typec: tcpm: Represent source supply through power_supply class

2018-02-06 Thread Adam Thomson
On 30 January 2018 13:12, Heikki Krogerus wrote: > Hi Adam, > > On Tue, Jan 02, 2018 at 03:50:54PM +0000, Adam Thomson wrote: > > This commit adds a power_supply class instance to represent a > > PD source's voltage and current properties. This provides an >

RE: [PATCH v4 4/7] typec: tcpm: Add core support for sink side PPS

2018-02-06 Thread Adam Thomson
On 30 January 2018 12:47, Heikki Krogerus wrote: > > +static int tcpm_pps_set_op_curr(struct tcpm_port *port, u16 op_curr) > > +{ > > + unsigned int target_mw; > > + int ret = 0; > > + > > + mutex_lock(&port->swap_lock); > > + mutex_lock(&port->lock); > > + > > + if (!port->pps_data.acti

RE: [PATCH v4 1/7] typec: tcpm: Add PD Rev 3.0 definitions to PD header

2018-02-06 Thread Adam Thomson
On 30 January 2018 12:22, Heikki Krogerus wrote: > On Tue, Jan 02, 2018 at 03:50:49PM +0000, Adam Thomson wrote: > > This commit adds definitions for PD Rev 3.0 messages, including > > APDO PPS and extended message support for TCPM. > > > > Signed-off-by: Adam Thoms

RE: [PATCH v4 0/7] typec: tcpm: Add sink side support for PPS

2018-02-05 Thread Adam Thomson
On 30 January 2018 13:25, Heikki Krogerus wrote: > On Tue, Jan 02, 2018 at 03:50:48PM +0000, Adam Thomson wrote: > > This patch set adds sink side support for the PPS feature introduced in the > > USB PD 3.0 specification. > > > > The source PPS supply is represe

[PATCH v4 0/7] typec: tcpm: Add sink side support for PPS

2018-01-02 Thread Adam Thomson
agreement. - New headers now use SPDX tags for referencing correct license. NOTE: Code changes are based on linux-next tag 'next-20171212' to pick up capabilities validation and selection updates. Adam Thomson (7): typec: tcpm: Add PD Rev 3.0 definitions to PD header typec: tcpm: Add A

[PATCH v4 3/7] typec: tcpm: Add SDB header for Status message handling

2018-01-02 Thread Adam Thomson
This commit adds a header providing definitions for handling Status messages. Currently the header only focuses on handling incoming Status messages. Signed-off-by: Adam Thomson --- include/linux/usb/pd_ext_sdb.h | 31 +++ 1 file changed, 31 insertions(+) create

[PATCH v4 1/7] typec: tcpm: Add PD Rev 3.0 definitions to PD header

2018-01-02 Thread Adam Thomson
This commit adds definitions for PD Rev 3.0 messages, including APDO PPS and extended message support for TCPM. Signed-off-by: Adam Thomson --- include/linux/usb/pd.h | 185 ++--- 1 file changed, 174 insertions(+), 11 deletions(-) diff --git a

[PATCH v4 4/7] typec: tcpm: Add core support for sink side PPS

2018-01-02 Thread Adam Thomson
This commit adds code to handle requesting of PPS APDOs. Switching between standard PDOs and APDOs, and re-requesting an APDO to modify operating voltage/current will be triggered by an external call into TCPM. Signed-off-by: Adam Thomson --- drivers/usb/typec/tcpm.c | 533

[PATCH v4 2/7] typec: tcpm: Add ADO header for Alert message handling

2018-01-02 Thread Adam Thomson
This commit adds a header providing definitions for handling Alert messages. Currently the header only focuses on handling incoming alerts. Signed-off-by: Adam Thomson --- include/linux/usb/pd_ado.h | 42 ++ 1 file changed, 42 insertions(+) create mode

[PATCH v4 5/7] power: supply: Add 'connected_type' property and supporting code

2018-01-02 Thread Adam Thomson
onal so as to not impact existing usage of the 'type' property. Signed-off-by: Adam Thomson --- drivers/power/supply/power_supply_sysfs.c | 50 +++ include/linux/power_supply.h | 15 ++ 2 files changed, 65 insertions(+) diff --git a/d

[PATCH v4 6/7] typec: tcpm: Represent source supply through power_supply class

2018-01-02 Thread Adam Thomson
pply class' Signed-off-by: Adam Thomson --- .../ABI/testing/sysfs-class-power-tcpm-source-psy | 92 drivers/usb/typec/Kconfig | 1 + drivers/usb/typec/fusb302/Kconfig | 2 +- drivers/usb/typec/fusb302/fusb302.c| 63 +---

[PATCH v4 7/7] typec: tcpm: Add support for sink PPS related messages

2018-01-02 Thread Adam Thomson
ndled. Signed-off-by: Adam Thomson --- drivers/usb/typec/tcpm.c | 152 --- 1 file changed, 143 insertions(+), 9 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index b86a51c..54d17d7 100644 --- a/drivers/usb/typec/tcpm.c

[PATCH v3 2/7] typec: tcpm: Add ADO header for Alert message handling

2017-12-18 Thread Adam Thomson
This commit adds a header providing definitions for handling Alert messages. Currently the header only focuses on handling incoming alerts. Signed-off-by: Adam Thomson --- include/linux/usb/pd_ado.h | 42 ++ 1 file changed, 42 insertions(+) create mode

[PATCH v3 5/7] power: supply: Add 'connected_type' property and supporting code

2017-12-18 Thread Adam Thomson
onal so as to not impact existing usage of the 'type' property. Signed-off-by: Adam Thomson --- drivers/power/supply/power_supply_sysfs.c | 50 +++ include/linux/power_supply.h | 15 ++ 2 files changed, 65 insertions(+) diff --git a/d

[PATCH v3 4/7] typec: tcpm: Add core support for sink side PPS

2017-12-18 Thread Adam Thomson
This commit adds code to handle requesting of PPS APDOs. Switching between standard PDOs and APDOs, and re-requesting an APDO to modify operating voltage/current will be triggered by an external call into TCPM. Signed-off-by: Adam Thomson --- drivers/usb/typec/tcpm.c | 533

[PATCH v3 0/7] typec: tcpm: Add sink side support for PPS

2017-12-18 Thread Adam Thomson
and usb_pd prefixes for macros and inline functions in headers. - Negotiate spec revision of PD headers during initial contract agreement. - New headers now use SPDX tags for referencing correct license. NOTE: Code changes are based on linux-next tag 'next-20171212' to pick up capabili

  1   2   >