RE: [PATCH v4 1/2] usb: phy: show USB charger type for user

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
> > Signed-off-by: Peter Chen <peter.chen@xxxxxxx>
> > ---
> > Changes for v4:
> > - No changes.
> >
> >  drivers/usb/phy/phy.c | 13 ++++++++++++-
> >  1 file changed, 12 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c index
> > 0277f62739a2..ad2554630889 100644
> > --- a/drivers/usb/phy/phy.c
> > +++ b/drivers/usb/phy/phy.c
> > @@ -34,6 +34,14 @@ struct phy_devm {
> >  	struct notifier_block *nb;
> >  };
> >
> > +static const char *const usb_chger_type[] = {
> > +	[UNKNOWN_TYPE]			=
> "USB_CHARGER_UNKNOWN_TYPE",
> > +	[SDP_TYPE]			= "USB_CHARGER_SDP_TYPE",
> > +	[CDP_TYPE]			= "USB_CHARGER_CDP_TYPE",
> > +	[DCP_TYPE]			= "USB_CHARGER_DCP_TYPE",
> > +	[ACA_TYPE]			= "USB_CHARGER_ACA_TYPE",
> > +};
> 
> As these are exported values (CDP_TYPE and friends), they really need to have
> explicit values on the .h file, otherwise it might not work properly on all systems.
> 

Sorry, what do you mean? These values are defined at include/uapi/linux/usb/charger.h

Peter




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux