RE: [PATCH v4 04/13] usb: typec: add fwnode to tcpc

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

 



Hi
> -----Original Message-----
> From: Heikki Krogerus [mailto:heikki.krogerus@xxxxxxxxxxxxxxx]
> Sent: 2018年3月29日 20:58
> To: Jun Li <jun.li@xxxxxxx>
> Cc: robh+dt@xxxxxxxxxx; gregkh@xxxxxxxxxxxxxxxxxxx; linux@xxxxxxxxxxxx;
> a.hajda@xxxxxxxxxxx; shufan_lee@xxxxxxxxxxx; Peter Chen
> <peter.chen@xxxxxxx>; devicetree@xxxxxxxxxxxxxxx;
> linux-usb@xxxxxxxxxxxxxxx; dl-linux-imx <linux-imx@xxxxxxx>;
> devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v4 04/13] usb: typec: add fwnode to tcpc
> 
> Hi,
> 
> On Thu, Mar 29, 2018 at 12:06:09AM +0800, Li Jun wrote:
> > Add fwnode handle to get the fwnode so we can get typec configs it
> > contains.
> >
> > Suggested-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
> > Signed-off-by: Li Jun <jun.li@xxxxxxx>
> > ---
> >  drivers/staging/typec/tcpci.c | 14 +++++++-------
> >  drivers/usb/typec/tcpm.c      |  1 +
> >  include/linux/usb/tcpm.h      |  2 ++
> >  3 files changed, 10 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/staging/typec/tcpci.c
> > b/drivers/staging/typec/tcpci.c index ed76327..4f7ad10 100644
> > --- a/drivers/staging/typec/tcpci.c
> > +++ b/drivers/staging/typec/tcpci.c
> > @@ -10,6 +10,7 @@
> >  #include <linux/module.h>
> >  #include <linux/i2c.h>
> >  #include <linux/interrupt.h>
> > +#include <linux/property.h>
> >  #include <linux/regmap.h>
> >  #include <linux/usb/pd.h>
> >  #include <linux/usb/tcpm.h>
> > @@ -463,17 +464,16 @@ static const struct regmap_config
> tcpci_regmap_config = {
> >  	.max_register = 0x7F, /* 0x80 .. 0xFF are vendor defined */  };
> >
> > -static const struct tcpc_config tcpci_tcpc_config = {
> > -	.type = TYPEC_PORT_DFP,
> > -	.default_role = TYPEC_SINK,
> > -};
> > -
> >  static int tcpci_parse_config(struct tcpci *tcpci)  {
> >  	tcpci->controls_vbus = true; /* XXX */
> >
> > -	/* TODO: Populate struct tcpc_config from ACPI/device-tree */
> > -	tcpci->tcpc.config = &tcpci_tcpc_config;
> 
> That will break bisectablitity. tcpm.c is still accessing the config at this point.
> 

Yes, good catch.

> Just leave those untouched in here, and clean-up in separate patch that comes
> after the patch that prepares tcpm.c.

I will change in next version, thanks.

Li Jun
> 
> 
> Thanks,
> 
> --
> heikki
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux