Re: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
On Mon, Apr 23, 2018 at 12:47:47PM +, Adam Thomson wrote: > On 23 April 2018 12:28, Greg Kroah-Hartman wrote: > > > On Mon, Apr 23, 2018 at 11:06:25AM +, 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 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 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 > > > > > > > > --- > > > > > > > > drivers/usb/typec/tcpm.c | 517 > > > > > > > ++- > > > > > > > > include/linux/usb/pd.h | 4 +- > > > > > > > > include/linux/usb/tcpm.h | 1 + > > > > > > > > 3 files changed, 509 insertions(+), 13 deletions(-) > > > > > > > > > > > > > > This patch adds build warnings to the tree, so I can't take it, > > > > > > > sorry. > > > > > > > Please fix up and resend. > > > > > > > > > > > > No problem. Sorry for that. Will take a look and resolve the > > > > > > warnings. > > > > > > > > > > Sadly this is going to be a bit more than 'resolve the warnings' task > > > > > now as Jun > > > > > Li's patch set has now made it in before me which means I need to > > > > > rebase PDO > > > > > Selection because of his changes. :( > > > > > > > > Someone was going to have to do that, sorry :( > > > > > > Just as an FYI, this patch will produce warnings until the associated > > > power_supply interface patch (number 5 in the series previously sent) is > > > included as that makes use of the new API. Not sure how I can get around > > > that > > > so I guess we have to wait on Sebastian to give the nod for the rest of > > > the > > > power_supply patches before this can make it through. > > > > That's not good. There has to be a way to prevent a build warning from > > happening... > > If we're ok with '__maybe_unused' then I can add that. Wasn't sure if > something > like that would be acceptable for this scenario. I don't remember what the warning was, or what the code was either, sorry...
Re: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
On Mon, Apr 23, 2018 at 12:47:47PM +, Adam Thomson wrote: > On 23 April 2018 12:28, Greg Kroah-Hartman wrote: > > > On Mon, Apr 23, 2018 at 11:06:25AM +, 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 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 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 > > > > > > > > --- > > > > > > > > drivers/usb/typec/tcpm.c | 517 > > > > > > > ++- > > > > > > > > include/linux/usb/pd.h | 4 +- > > > > > > > > include/linux/usb/tcpm.h | 1 + > > > > > > > > 3 files changed, 509 insertions(+), 13 deletions(-) > > > > > > > > > > > > > > This patch adds build warnings to the tree, so I can't take it, > > > > > > > sorry. > > > > > > > Please fix up and resend. > > > > > > > > > > > > No problem. Sorry for that. Will take a look and resolve the > > > > > > warnings. > > > > > > > > > > Sadly this is going to be a bit more than 'resolve the warnings' task > > > > > now as Jun > > > > > Li's patch set has now made it in before me which means I need to > > > > > rebase PDO > > > > > Selection because of his changes. :( > > > > > > > > Someone was going to have to do that, sorry :( > > > > > > Just as an FYI, this patch will produce warnings until the associated > > > power_supply interface patch (number 5 in the series previously sent) is > > > included as that makes use of the new API. Not sure how I can get around > > > that > > > so I guess we have to wait on Sebastian to give the nod for the rest of > > > the > > > power_supply patches before this can make it through. > > > > That's not good. There has to be a way to prevent a build warning from > > happening... > > If we're ok with '__maybe_unused' then I can add that. Wasn't sure if > something > like that would be acceptable for this scenario. I don't remember what the warning was, or what the code was either, sorry...
RE: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
On 23 April 2018 12:28, Greg Kroah-Hartman wrote: > On Mon, Apr 23, 2018 at 11:06:25AM +, 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 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 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 > > > > > > > --- > > > > > > > drivers/usb/typec/tcpm.c | 517 > > > > > > ++- > > > > > > > include/linux/usb/pd.h | 4 +- > > > > > > > include/linux/usb/tcpm.h | 1 + > > > > > > > 3 files changed, 509 insertions(+), 13 deletions(-) > > > > > > > > > > > > This patch adds build warnings to the tree, so I can't take it, > > > > > > sorry. > > > > > > Please fix up and resend. > > > > > > > > > > No problem. Sorry for that. Will take a look and resolve the warnings. > > > > > > > > Sadly this is going to be a bit more than 'resolve the warnings' task > > > > now as Jun > > > > Li's patch set has now made it in before me which means I need to > > > > rebase PDO > > > > Selection because of his changes. :( > > > > > > Someone was going to have to do that, sorry :( > > > > Just as an FYI, this patch will produce warnings until the associated > > power_supply interface patch (number 5 in the series previously sent) is > > included as that makes use of the new API. Not sure how I can get around > > that > > so I guess we have to wait on Sebastian to give the nod for the rest of the > > power_supply patches before this can make it through. > > That's not good. There has to be a way to prevent a build warning from > happening... If we're ok with '__maybe_unused' then I can add that. Wasn't sure if something like that would be acceptable for this scenario.
RE: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
On 23 April 2018 12:28, Greg Kroah-Hartman wrote: > On Mon, Apr 23, 2018 at 11:06:25AM +, 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 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 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 > > > > > > > --- > > > > > > > drivers/usb/typec/tcpm.c | 517 > > > > > > ++- > > > > > > > include/linux/usb/pd.h | 4 +- > > > > > > > include/linux/usb/tcpm.h | 1 + > > > > > > > 3 files changed, 509 insertions(+), 13 deletions(-) > > > > > > > > > > > > This patch adds build warnings to the tree, so I can't take it, > > > > > > sorry. > > > > > > Please fix up and resend. > > > > > > > > > > No problem. Sorry for that. Will take a look and resolve the warnings. > > > > > > > > Sadly this is going to be a bit more than 'resolve the warnings' task > > > > now as Jun > > > > Li's patch set has now made it in before me which means I need to > > > > rebase PDO > > > > Selection because of his changes. :( > > > > > > Someone was going to have to do that, sorry :( > > > > Just as an FYI, this patch will produce warnings until the associated > > power_supply interface patch (number 5 in the series previously sent) is > > included as that makes use of the new API. Not sure how I can get around > > that > > so I guess we have to wait on Sebastian to give the nod for the rest of the > > power_supply patches before this can make it through. > > That's not good. There has to be a way to prevent a build warning from > happening... If we're ok with '__maybe_unused' then I can add that. Wasn't sure if something like that would be acceptable for this scenario.
Re: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
On Mon, Apr 23, 2018 at 11:06:25AM +, 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 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 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 > > > > > > --- > > > > > > drivers/usb/typec/tcpm.c | 517 > > > > > ++- > > > > > > include/linux/usb/pd.h | 4 +- > > > > > > include/linux/usb/tcpm.h | 1 + > > > > > > 3 files changed, 509 insertions(+), 13 deletions(-) > > > > > > > > > > This patch adds build warnings to the tree, so I can't take it, sorry. > > > > > Please fix up and resend. > > > > > > > > No problem. Sorry for that. Will take a look and resolve the warnings. > > > > > > Sadly this is going to be a bit more than 'resolve the warnings' task now > > > as Jun > > > Li's patch set has now made it in before me which means I need to rebase > > > PDO > > > Selection because of his changes. :( > > > > Someone was going to have to do that, sorry :( > > Just as an FYI, this patch will produce warnings until the associated > power_supply interface patch (number 5 in the series previously sent) is > included as that makes use of the new API. Not sure how I can get around that > so I guess we have to wait on Sebastian to give the nod for the rest of the > power_supply patches before this can make it through. That's not good. There has to be a way to prevent a build warning from happening... thanks, greg k-h
Re: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
On Mon, Apr 23, 2018 at 11:06:25AM +, 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 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 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 > > > > > > --- > > > > > > drivers/usb/typec/tcpm.c | 517 > > > > > ++- > > > > > > include/linux/usb/pd.h | 4 +- > > > > > > include/linux/usb/tcpm.h | 1 + > > > > > > 3 files changed, 509 insertions(+), 13 deletions(-) > > > > > > > > > > This patch adds build warnings to the tree, so I can't take it, sorry. > > > > > Please fix up and resend. > > > > > > > > No problem. Sorry for that. Will take a look and resolve the warnings. > > > > > > Sadly this is going to be a bit more than 'resolve the warnings' task now > > > as Jun > > > Li's patch set has now made it in before me which means I need to rebase > > > PDO > > > Selection because of his changes. :( > > > > Someone was going to have to do that, sorry :( > > Just as an FYI, this patch will produce warnings until the associated > power_supply interface patch (number 5 in the series previously sent) is > included as that makes use of the new API. Not sure how I can get around that > so I guess we have to wait on Sebastian to give the nod for the rest of the > power_supply patches before this can make it through. That's not good. There has to be a way to prevent a build warning from happening... thanks, greg k-h
RE: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
On 23 April 2018 09:25, Greg Kroah-Hartman wrote: > On Mon, Apr 23, 2018 at 07:49:38AM +, 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, 2018 at 10:12:20AM +, 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 voltage/current will be triggered by an > > > > > external call into TCPM. > > > > > > > > > > Signed-off-by: Adam Thomson> > > > > Acked-by: Heikki Krogerus > > > > > Reviewed-by: Guenter Roeck > > > > > --- > > > > > drivers/usb/typec/tcpm.c | 517 > > > > ++- > > > > > include/linux/usb/pd.h | 4 +- > > > > > include/linux/usb/tcpm.h | 1 + > > > > > 3 files changed, 509 insertions(+), 13 deletions(-) > > > > > > > > This patch adds build warnings to the tree, so I can't take it, sorry. > > > > Please fix up and resend. > > > > > > No problem. Sorry for that. Will take a look and resolve the warnings. > > > > Sadly this is going to be a bit more than 'resolve the warnings' task now > > as Jun > > Li's patch set has now made it in before me which means I need to rebase PDO > > Selection because of his changes. :( > > Someone was going to have to do that, sorry :( Just as an FYI, this patch will produce warnings until the associated power_supply interface patch (number 5 in the series previously sent) is included as that makes use of the new API. Not sure how I can get around that so I guess we have to wait on Sebastian to give the nod for the rest of the power_supply patches before this can make it through. Anyway, will rebase and resend, and will further highlight this reliance in the cover letter.
RE: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
On 23 April 2018 09:25, Greg Kroah-Hartman wrote: > On Mon, Apr 23, 2018 at 07:49:38AM +, 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, 2018 at 10:12:20AM +, 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 voltage/current will be triggered by an > > > > > external call into TCPM. > > > > > > > > > > Signed-off-by: Adam Thomson > > > > > Acked-by: Heikki Krogerus > > > > > Reviewed-by: Guenter Roeck > > > > > --- > > > > > drivers/usb/typec/tcpm.c | 517 > > > > ++- > > > > > include/linux/usb/pd.h | 4 +- > > > > > include/linux/usb/tcpm.h | 1 + > > > > > 3 files changed, 509 insertions(+), 13 deletions(-) > > > > > > > > This patch adds build warnings to the tree, so I can't take it, sorry. > > > > Please fix up and resend. > > > > > > No problem. Sorry for that. Will take a look and resolve the warnings. > > > > Sadly this is going to be a bit more than 'resolve the warnings' task now > > as Jun > > Li's patch set has now made it in before me which means I need to rebase PDO > > Selection because of his changes. :( > > Someone was going to have to do that, sorry :( Just as an FYI, this patch will produce warnings until the associated power_supply interface patch (number 5 in the series previously sent) is included as that makes use of the new API. Not sure how I can get around that so I guess we have to wait on Sebastian to give the nod for the rest of the power_supply patches before this can make it through. Anyway, will rebase and resend, and will further highlight this reliance in the cover letter.
Re: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
On Mon, Apr 23, 2018 at 07:49:38AM +, 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, 2018 at 10:12:20AM +, 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 voltage/current will be triggered by an > > > > external call into TCPM. > > > > > > > > Signed-off-by: Adam Thomson> > > > Acked-by: Heikki Krogerus > > > > Reviewed-by: Guenter Roeck > > > > --- > > > > drivers/usb/typec/tcpm.c | 517 > > > ++- > > > > include/linux/usb/pd.h | 4 +- > > > > include/linux/usb/tcpm.h | 1 + > > > > 3 files changed, 509 insertions(+), 13 deletions(-) > > > > > > This patch adds build warnings to the tree, so I can't take it, sorry. > > > Please fix up and resend. > > > > No problem. Sorry for that. Will take a look and resolve the warnings. > > Sadly this is going to be a bit more than 'resolve the warnings' task now as > Jun > Li's patch set has now made it in before me which means I need to rebase PDO > Selection because of his changes. :( Someone was going to have to do that, sorry :(
Re: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
On Mon, Apr 23, 2018 at 07:49:38AM +, 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, 2018 at 10:12:20AM +, 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 voltage/current will be triggered by an > > > > external call into TCPM. > > > > > > > > Signed-off-by: Adam Thomson > > > > Acked-by: Heikki Krogerus > > > > Reviewed-by: Guenter Roeck > > > > --- > > > > drivers/usb/typec/tcpm.c | 517 > > > ++- > > > > include/linux/usb/pd.h | 4 +- > > > > include/linux/usb/tcpm.h | 1 + > > > > 3 files changed, 509 insertions(+), 13 deletions(-) > > > > > > This patch adds build warnings to the tree, so I can't take it, sorry. > > > Please fix up and resend. > > > > No problem. Sorry for that. Will take a look and resolve the warnings. > > Sadly this is going to be a bit more than 'resolve the warnings' task now as > Jun > Li's patch set has now made it in before me which means I need to rebase PDO > Selection because of his changes. :( Someone was going to have to do that, sorry :(
RE: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
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 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 > > > --- > > > drivers/usb/typec/tcpm.c | 517 > > ++- > > > include/linux/usb/pd.h | 4 +- > > > include/linux/usb/tcpm.h | 1 + > > > 3 files changed, 509 insertions(+), 13 deletions(-) > > > > This patch adds build warnings to the tree, so I can't take it, sorry. > > Please fix up and resend. > > No problem. Sorry for that. Will take a look and resolve the warnings. Sadly this is going to be a bit more than 'resolve the warnings' task now as Jun Li's patch set has now made it in before me which means I need to rebase PDO Selection because of his changes. :(
RE: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
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 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 > > > --- > > > drivers/usb/typec/tcpm.c | 517 > > ++- > > > include/linux/usb/pd.h | 4 +- > > > include/linux/usb/tcpm.h | 1 + > > > 3 files changed, 509 insertions(+), 13 deletions(-) > > > > This patch adds build warnings to the tree, so I can't take it, sorry. > > Please fix up and resend. > > No problem. Sorry for that. Will take a look and resolve the warnings. Sadly this is going to be a bit more than 'resolve the warnings' task now as Jun Li's patch set has now made it in before me which means I need to rebase PDO Selection because of his changes. :(
RE: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
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 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 > > --- > > drivers/usb/typec/tcpm.c | 517 > ++- > > include/linux/usb/pd.h | 4 +- > > include/linux/usb/tcpm.h | 1 + > > 3 files changed, 509 insertions(+), 13 deletions(-) > > This patch adds build warnings to the tree, so I can't take it, sorry. > Please fix up and resend. No problem. Sorry for that. Will take a look and resolve the warnings.
RE: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
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 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 > > --- > > drivers/usb/typec/tcpm.c | 517 > ++- > > include/linux/usb/pd.h | 4 +- > > include/linux/usb/tcpm.h | 1 + > > 3 files changed, 509 insertions(+), 13 deletions(-) > > This patch adds build warnings to the tree, so I can't take it, sorry. > Please fix up and resend. No problem. Sorry for that. Will take a look and resolve the warnings.
Re: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
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 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 > --- > drivers/usb/typec/tcpm.c | 517 > ++- > include/linux/usb/pd.h | 4 +- > include/linux/usb/tcpm.h | 1 + > 3 files changed, 509 insertions(+), 13 deletions(-) This patch adds build warnings to the tree, so I can't take it, sorry. Please fix up and resend. thanks, greg k-h
Re: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
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 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 > --- > drivers/usb/typec/tcpm.c | 517 > ++- > include/linux/usb/pd.h | 4 +- > include/linux/usb/tcpm.h | 1 + > 3 files changed, 509 insertions(+), 13 deletions(-) This patch adds build warnings to the tree, so I can't take it, sorry. Please fix up and resend. thanks, greg k-h
Re: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
On 03/23/2018 03:12 AM, 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 voltage/current will be triggered by an external call into TCPM. Signed-off-by: Adam ThomsonAcked-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drivers/usb/typec/tcpm.c | 517 ++- include/linux/usb/pd.h | 4 +- include/linux/usb/tcpm.h | 1 + 3 files changed, 509 insertions(+), 13 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 4c0fc54..1a66c9e 100644 --- a/drivers/usb/typec/tcpm.c +++ b/drivers/usb/typec/tcpm.c @@ -47,6 +47,7 @@ S(SNK_DISCOVERY_DEBOUNCE_DONE), \ S(SNK_WAIT_CAPABILITIES), \ S(SNK_NEGOTIATE_CAPABILITIES), \ + S(SNK_NEGOTIATE_PPS_CAPABILITIES), \ S(SNK_TRANSITION_SINK), \ S(SNK_TRANSITION_SINK_VBUS),\ S(SNK_READY), \ @@ -166,6 +167,16 @@ struct pd_mode_data { struct typec_altmode_desc altmode_desc[SVID_DISCOVERY_MAX]; }; +struct pd_pps_data { + u32 min_volt; + u32 max_volt; + u32 max_curr; + u32 out_volt; + u32 op_curr; + bool supported; + bool active; +}; + struct tcpm_port { struct device *dev; @@ -233,6 +244,7 @@ struct tcpm_port { struct completion swap_complete; int swap_status; + unsigned int negotiated_rev; unsigned int message_id; unsigned int caps_count; unsigned int hard_reset_count; @@ -259,6 +271,7 @@ struct tcpm_port { unsigned int max_snk_ma; unsigned int max_snk_mw; unsigned int operating_snk_mw; + bool update_sink_caps; /* Requested current / voltage */ u32 current_limit; @@ -275,8 +288,13 @@ struct tcpm_port { /* VDO to retry if UFP responder replied busy */ u32 vdo_retry; - /* Alternate mode data */ + /* PPS */ + struct pd_pps_data pps_data; + struct completion pps_complete; + bool pps_pending; + int pps_status; + /* Alternate mode data */ struct pd_mode_data mode_data; struct typec_altmode *partner_altmode[SVID_DISCOVERY_MAX]; struct typec_altmode *port_altmode[SVID_DISCOVERY_MAX]; @@ -494,6 +512,16 @@ static void tcpm_log_source_caps(struct tcpm_port *port) pdo_max_voltage(pdo), pdo_max_power(pdo)); break; + case PDO_TYPE_APDO: + if (pdo_apdo_type(pdo) == APDO_TYPE_PPS) + scnprintf(msg, sizeof(msg), + "%u-%u mV, %u mA", + pdo_pps_apdo_min_voltage(pdo), + pdo_pps_apdo_max_voltage(pdo), + pdo_pps_apdo_max_current(pdo)); + else + strcpy(msg, "undefined APDO"); + break; default: strcpy(msg, "undefined"); break; @@ -777,11 +805,13 @@ static int tcpm_pd_send_source_caps(struct tcpm_port *port) msg.header = PD_HEADER_LE(PD_CTRL_REJECT, port->pwr_role, port->data_role, + port->negotiated_rev, port->message_id, 0); } else { msg.header = PD_HEADER_LE(PD_DATA_SOURCE_CAP, port->pwr_role, port->data_role, + port->negotiated_rev, port->message_id, port->nr_src_pdo); } @@ -802,11 +832,13 @@ static int tcpm_pd_send_sink_caps(struct tcpm_port *port) msg.header = PD_HEADER_LE(PD_CTRL_REJECT, port->pwr_role, port->data_role, + port->negotiated_rev, port->message_id, 0); } else { msg.header = PD_HEADER_LE(PD_DATA_SINK_CAP, port->pwr_role, port->data_role, + port->negotiated_rev, port->message_id, port->nr_snk_pdo); } @@ -1173,6 +1205,7 @@ static void
Re: [PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
On 03/23/2018 03:12 AM, 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 voltage/current will be triggered by an external call into TCPM. Signed-off-by: Adam Thomson Acked-by: Heikki Krogerus Reviewed-by: Guenter Roeck --- drivers/usb/typec/tcpm.c | 517 ++- include/linux/usb/pd.h | 4 +- include/linux/usb/tcpm.h | 1 + 3 files changed, 509 insertions(+), 13 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 4c0fc54..1a66c9e 100644 --- a/drivers/usb/typec/tcpm.c +++ b/drivers/usb/typec/tcpm.c @@ -47,6 +47,7 @@ S(SNK_DISCOVERY_DEBOUNCE_DONE), \ S(SNK_WAIT_CAPABILITIES), \ S(SNK_NEGOTIATE_CAPABILITIES), \ + S(SNK_NEGOTIATE_PPS_CAPABILITIES), \ S(SNK_TRANSITION_SINK), \ S(SNK_TRANSITION_SINK_VBUS),\ S(SNK_READY), \ @@ -166,6 +167,16 @@ struct pd_mode_data { struct typec_altmode_desc altmode_desc[SVID_DISCOVERY_MAX]; }; +struct pd_pps_data { + u32 min_volt; + u32 max_volt; + u32 max_curr; + u32 out_volt; + u32 op_curr; + bool supported; + bool active; +}; + struct tcpm_port { struct device *dev; @@ -233,6 +244,7 @@ struct tcpm_port { struct completion swap_complete; int swap_status; + unsigned int negotiated_rev; unsigned int message_id; unsigned int caps_count; unsigned int hard_reset_count; @@ -259,6 +271,7 @@ struct tcpm_port { unsigned int max_snk_ma; unsigned int max_snk_mw; unsigned int operating_snk_mw; + bool update_sink_caps; /* Requested current / voltage */ u32 current_limit; @@ -275,8 +288,13 @@ struct tcpm_port { /* VDO to retry if UFP responder replied busy */ u32 vdo_retry; - /* Alternate mode data */ + /* PPS */ + struct pd_pps_data pps_data; + struct completion pps_complete; + bool pps_pending; + int pps_status; + /* Alternate mode data */ struct pd_mode_data mode_data; struct typec_altmode *partner_altmode[SVID_DISCOVERY_MAX]; struct typec_altmode *port_altmode[SVID_DISCOVERY_MAX]; @@ -494,6 +512,16 @@ static void tcpm_log_source_caps(struct tcpm_port *port) pdo_max_voltage(pdo), pdo_max_power(pdo)); break; + case PDO_TYPE_APDO: + if (pdo_apdo_type(pdo) == APDO_TYPE_PPS) + scnprintf(msg, sizeof(msg), + "%u-%u mV, %u mA", + pdo_pps_apdo_min_voltage(pdo), + pdo_pps_apdo_max_voltage(pdo), + pdo_pps_apdo_max_current(pdo)); + else + strcpy(msg, "undefined APDO"); + break; default: strcpy(msg, "undefined"); break; @@ -777,11 +805,13 @@ static int tcpm_pd_send_source_caps(struct tcpm_port *port) msg.header = PD_HEADER_LE(PD_CTRL_REJECT, port->pwr_role, port->data_role, + port->negotiated_rev, port->message_id, 0); } else { msg.header = PD_HEADER_LE(PD_DATA_SOURCE_CAP, port->pwr_role, port->data_role, + port->negotiated_rev, port->message_id, port->nr_src_pdo); } @@ -802,11 +832,13 @@ static int tcpm_pd_send_sink_caps(struct tcpm_port *port) msg.header = PD_HEADER_LE(PD_CTRL_REJECT, port->pwr_role, port->data_role, + port->negotiated_rev, port->message_id, 0); } else { msg.header = PD_HEADER_LE(PD_DATA_SINK_CAP, port->pwr_role, port->data_role, + port->negotiated_rev, port->message_id, port->nr_snk_pdo); } @@ -1173,6 +1205,7 @@ static void vdm_run_state_machine(struct tcpm_port *port) msg.header =
[PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
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 ThomsonAcked-by: Heikki Krogerus --- drivers/usb/typec/tcpm.c | 517 ++- include/linux/usb/pd.h | 4 +- include/linux/usb/tcpm.h | 1 + 3 files changed, 509 insertions(+), 13 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 4c0fc54..1a66c9e 100644 --- a/drivers/usb/typec/tcpm.c +++ b/drivers/usb/typec/tcpm.c @@ -47,6 +47,7 @@ S(SNK_DISCOVERY_DEBOUNCE_DONE), \ S(SNK_WAIT_CAPABILITIES), \ S(SNK_NEGOTIATE_CAPABILITIES), \ + S(SNK_NEGOTIATE_PPS_CAPABILITIES), \ S(SNK_TRANSITION_SINK), \ S(SNK_TRANSITION_SINK_VBUS),\ S(SNK_READY), \ @@ -166,6 +167,16 @@ struct pd_mode_data { struct typec_altmode_desc altmode_desc[SVID_DISCOVERY_MAX]; }; +struct pd_pps_data { + u32 min_volt; + u32 max_volt; + u32 max_curr; + u32 out_volt; + u32 op_curr; + bool supported; + bool active; +}; + struct tcpm_port { struct device *dev; @@ -233,6 +244,7 @@ struct tcpm_port { struct completion swap_complete; int swap_status; + unsigned int negotiated_rev; unsigned int message_id; unsigned int caps_count; unsigned int hard_reset_count; @@ -259,6 +271,7 @@ struct tcpm_port { unsigned int max_snk_ma; unsigned int max_snk_mw; unsigned int operating_snk_mw; + bool update_sink_caps; /* Requested current / voltage */ u32 current_limit; @@ -275,8 +288,13 @@ struct tcpm_port { /* VDO to retry if UFP responder replied busy */ u32 vdo_retry; - /* Alternate mode data */ + /* PPS */ + struct pd_pps_data pps_data; + struct completion pps_complete; + bool pps_pending; + int pps_status; + /* Alternate mode data */ struct pd_mode_data mode_data; struct typec_altmode *partner_altmode[SVID_DISCOVERY_MAX]; struct typec_altmode *port_altmode[SVID_DISCOVERY_MAX]; @@ -494,6 +512,16 @@ static void tcpm_log_source_caps(struct tcpm_port *port) pdo_max_voltage(pdo), pdo_max_power(pdo)); break; + case PDO_TYPE_APDO: + if (pdo_apdo_type(pdo) == APDO_TYPE_PPS) + scnprintf(msg, sizeof(msg), + "%u-%u mV, %u mA", + pdo_pps_apdo_min_voltage(pdo), + pdo_pps_apdo_max_voltage(pdo), + pdo_pps_apdo_max_current(pdo)); + else + strcpy(msg, "undefined APDO"); + break; default: strcpy(msg, "undefined"); break; @@ -777,11 +805,13 @@ static int tcpm_pd_send_source_caps(struct tcpm_port *port) msg.header = PD_HEADER_LE(PD_CTRL_REJECT, port->pwr_role, port->data_role, + port->negotiated_rev, port->message_id, 0); } else { msg.header = PD_HEADER_LE(PD_DATA_SOURCE_CAP, port->pwr_role, port->data_role, + port->negotiated_rev, port->message_id, port->nr_src_pdo); } @@ -802,11 +832,13 @@ static int tcpm_pd_send_sink_caps(struct tcpm_port *port) msg.header = PD_HEADER_LE(PD_CTRL_REJECT, port->pwr_role, port->data_role, + port->negotiated_rev, port->message_id, 0); } else { msg.header = PD_HEADER_LE(PD_DATA_SINK_CAP, port->pwr_role, port->data_role, + port->negotiated_rev, port->message_id, port->nr_snk_pdo); } @@ -1173,6 +1205,7 @@ static void vdm_run_state_machine(struct tcpm_port *port) msg.header =
[PATCH v7 1/6] typec: tcpm: Add core support for sink side PPS
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 | 517 ++- include/linux/usb/pd.h | 4 +- include/linux/usb/tcpm.h | 1 + 3 files changed, 509 insertions(+), 13 deletions(-) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 4c0fc54..1a66c9e 100644 --- a/drivers/usb/typec/tcpm.c +++ b/drivers/usb/typec/tcpm.c @@ -47,6 +47,7 @@ S(SNK_DISCOVERY_DEBOUNCE_DONE), \ S(SNK_WAIT_CAPABILITIES), \ S(SNK_NEGOTIATE_CAPABILITIES), \ + S(SNK_NEGOTIATE_PPS_CAPABILITIES), \ S(SNK_TRANSITION_SINK), \ S(SNK_TRANSITION_SINK_VBUS),\ S(SNK_READY), \ @@ -166,6 +167,16 @@ struct pd_mode_data { struct typec_altmode_desc altmode_desc[SVID_DISCOVERY_MAX]; }; +struct pd_pps_data { + u32 min_volt; + u32 max_volt; + u32 max_curr; + u32 out_volt; + u32 op_curr; + bool supported; + bool active; +}; + struct tcpm_port { struct device *dev; @@ -233,6 +244,7 @@ struct tcpm_port { struct completion swap_complete; int swap_status; + unsigned int negotiated_rev; unsigned int message_id; unsigned int caps_count; unsigned int hard_reset_count; @@ -259,6 +271,7 @@ struct tcpm_port { unsigned int max_snk_ma; unsigned int max_snk_mw; unsigned int operating_snk_mw; + bool update_sink_caps; /* Requested current / voltage */ u32 current_limit; @@ -275,8 +288,13 @@ struct tcpm_port { /* VDO to retry if UFP responder replied busy */ u32 vdo_retry; - /* Alternate mode data */ + /* PPS */ + struct pd_pps_data pps_data; + struct completion pps_complete; + bool pps_pending; + int pps_status; + /* Alternate mode data */ struct pd_mode_data mode_data; struct typec_altmode *partner_altmode[SVID_DISCOVERY_MAX]; struct typec_altmode *port_altmode[SVID_DISCOVERY_MAX]; @@ -494,6 +512,16 @@ static void tcpm_log_source_caps(struct tcpm_port *port) pdo_max_voltage(pdo), pdo_max_power(pdo)); break; + case PDO_TYPE_APDO: + if (pdo_apdo_type(pdo) == APDO_TYPE_PPS) + scnprintf(msg, sizeof(msg), + "%u-%u mV, %u mA", + pdo_pps_apdo_min_voltage(pdo), + pdo_pps_apdo_max_voltage(pdo), + pdo_pps_apdo_max_current(pdo)); + else + strcpy(msg, "undefined APDO"); + break; default: strcpy(msg, "undefined"); break; @@ -777,11 +805,13 @@ static int tcpm_pd_send_source_caps(struct tcpm_port *port) msg.header = PD_HEADER_LE(PD_CTRL_REJECT, port->pwr_role, port->data_role, + port->negotiated_rev, port->message_id, 0); } else { msg.header = PD_HEADER_LE(PD_DATA_SOURCE_CAP, port->pwr_role, port->data_role, + port->negotiated_rev, port->message_id, port->nr_src_pdo); } @@ -802,11 +832,13 @@ static int tcpm_pd_send_sink_caps(struct tcpm_port *port) msg.header = PD_HEADER_LE(PD_CTRL_REJECT, port->pwr_role, port->data_role, + port->negotiated_rev, port->message_id, 0); } else { msg.header = PD_HEADER_LE(PD_DATA_SINK_CAP, port->pwr_role, port->data_role, + port->negotiated_rev, port->message_id, port->nr_snk_pdo); } @@ -1173,6 +1205,7 @@ static void vdm_run_state_machine(struct tcpm_port *port) msg.header = PD_HEADER_LE(PD_DATA_VENDOR_DEF, port->pwr_role,