Re: [RFC PATCH v2 6/7] typec: tcpm: Represent source supply through power_supply class

2017-11-28 Thread Heikki Krogerus
On Mon, Nov 27, 2017 at 04:54:08PM +, Adam Thomson wrote: > On 27 November 2017 14:12, Heikki Krogerus wrote: > > > Hi Adam, > > > > On Fri, Nov 24, 2017 at 02:05:27PM +, Adam Thomson wrote: > > > On 24 November 2017 12:19, Heikki Krogerus wrote: > > > > Is it OK to everybody that the typ

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

2017-11-27 Thread Adam Thomson
On 27 November 2017 14:12, Heikki Krogerus wrote: > Hi Adam, > > On Fri, Nov 24, 2017 at 02:05:27PM +, Adam Thomson wrote: > > On 24 November 2017 12:19, Heikki Krogerus wrote: > > > Is it OK to everybody that the type of the psy is changed like that? > > > Hans?! > > > > > > We do have drive

Re: [RFC PATCH v2 6/7] typec: tcpm: Represent source supply through power_supply class

2017-11-27 Thread Heikki Krogerus
Hi Adam, On Fri, Nov 24, 2017 at 02:05:27PM +, Adam Thomson wrote: > On 24 November 2017 12:19, Heikki Krogerus wrote: > > Is it OK to everybody that the type of the psy is changed like that? > > Hans?! > > > > We do have drivers that already change the type, for example > > drivers/power/sup

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

2017-11-27 Thread Adam Thomson
On 25 November 2017 14:03, Hans de Goede wrote: > Hi, > > On 11/24/2017 01:19 PM, Heikki Krogerus wrote: > > Hi, > > > > On Tue, Nov 14, 2017 at 11:44:47AM +, Adam Thomson wrote: > >> diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c > >> index 78983e1..7c26c3d 100644 > >> ---

Re: [RFC PATCH v2 6/7] typec: tcpm: Represent source supply through power_supply class

2017-11-27 Thread Heikki Krogerus
On Sat, Nov 25, 2017 at 03:03:02PM +0100, Hans de Goede wrote: > > Is it OK to everybody that the type of the psy is changed like that? > > Hans?! > > > > We do have drivers that already change the type, for example > > drivers/power/supply/isp1704_charger.c, but what does the user space > > expec

Re: [RFC PATCH v2 6/7] typec: tcpm: Represent source supply through power_supply class

2017-11-25 Thread Hans de Goede
Hi, On 11/24/2017 01:19 PM, Heikki Krogerus wrote: Hi, On Tue, Nov 14, 2017 at 11:44:47AM +, Adam Thomson wrote: diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 78983e1..7c26c3d 100644 --- a/drivers/usb/typec/tcpm.c +++ b/drivers/usb/typec/tcpm.c @@ -12,6 +12,7 @@

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

2017-11-24 Thread Adam Thomson
On 24 November 2017 12:19, Heikki Krogerus wrote: > Hi, > > On Tue, Nov 14, 2017 at 11:44:47AM +, Adam Thomson wrote: > > diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c > > index 78983e1..7c26c3d 100644 > > --- a/drivers/usb/typec/tcpm.c > > +++ b/drivers/usb/typec/tcpm.c >

Re: [RFC PATCH v2 6/7] typec: tcpm: Represent source supply through power_supply class

2017-11-24 Thread Heikki Krogerus
Hi, On Tue, Nov 14, 2017 at 11:44:47AM +, Adam Thomson wrote: > diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c > index 78983e1..7c26c3d 100644 > --- a/drivers/usb/typec/tcpm.c > +++ b/drivers/usb/typec/tcpm.c > @@ -12,6 +12,7 @@ > #include > #include > #include > +#incl

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

2017-11-14 Thread Adam Thomson
This commit adds a power_supply class instance to represent a PD source's voltage and current properties. This provides an interface for reading these properties from user-space or other drivers. For PPS enabled Sources, this also provides write access to set the current and voltage and allows for