All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: usb: typec: driver for TI HD3SS3220 USB Type-C DRP port controller question
       [not found] <TYYPR01MB70867A4B8CEBD6450A239D45F5B09@TYYPR01MB7086.jpnprd01.prod.outlook.com>
@ 2022-06-21  7:23 ` Heikki Krogerus
  2022-06-21  8:28   ` Phil Edworthy
  0 siblings, 1 reply; 5+ messages in thread
From: Heikki Krogerus @ 2022-06-21  7:23 UTC (permalink / raw)
  To: Phil Edworthy; +Cc: Biju Das, Aswath Govindraju, linux-usb

Hi Phil,

On Mon, Jun 20, 2022 at 09:04:10AM +0000, Phil Edworthy wrote:
> Hi Heikki,
> 
> I have a board that uses the TI HD3SS3220 USB Type-C DRP port
> controller [1], however it doesn't have the interrupt line
> connected. How would you recommend I handle this? Should I get
> the driver to poll the i2c registers?
> 
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/typec/hd3ss3220.c?h=v5.19-rc3

If you have some other way of detecting connections on your system,
then we probable could consider some kind of notifier, but as a
general solution for the lack of interrupt, I think polling is the
only way.

I'll add the list, and Aswath and Roger. Aswath and Roger were looking
at the same problem with the tps6598x (tipd) driver.


thanks,

-- 
heikki

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: usb: typec: driver for TI HD3SS3220 USB Type-C DRP port controller question
  2022-06-21  7:23 ` usb: typec: driver for TI HD3SS3220 USB Type-C DRP port controller question Heikki Krogerus
@ 2022-06-21  8:28   ` Phil Edworthy
  2022-06-21  8:40     ` Biju Das
  0 siblings, 1 reply; 5+ messages in thread
From: Phil Edworthy @ 2022-06-21  8:28 UTC (permalink / raw)
  To: Heikki Krogerus; +Cc: Biju Das, Aswath Govindraju, linux-usb

Hi Heikki,

On 21 June 2022 08:23 Heikki Krogerus wrote:
> On Mon, Jun 20, 2022 at 09:04:10AM +0000, Phil Edworthy wrote:
> > Hi Heikki,
> >
> > I have a board that uses the TI HD3SS3220 USB Type-C DRP port
> > controller [1], however it doesn't have the interrupt line
> > connected. How would you recommend I handle this? Should I get
> > the driver to poll the i2c registers?
> >
> > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/typec/hd3ss3220.c?h=v5.19-rc3
> 
> If you have some other way of detecting connections on your system,
> then we probable could consider some kind of notifier, but as a
> general solution for the lack of interrupt, I think polling is the
> only way.
Thanks for your comments.

I wonder if this is a problem that affects quite a few drivers, where
a generic polling solution can be used instead of interrupts. This
would require a driver-specific function that can detect when an
interrupt would have occurred, e.g. by reading a register via i2c.
This is already done like that for ethernet PHY interrupts.

> I'll add the list, and Aswath and Roger. Aswath and Roger were looking
> at the same problem with the tps6598x (tipd) driver.

Thanks
Phil

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: usb: typec: driver for TI HD3SS3220 USB Type-C DRP port controller question
  2022-06-21  8:28   ` Phil Edworthy
@ 2022-06-21  8:40     ` Biju Das
  2022-06-21  8:43       ` Phil Edworthy
  0 siblings, 1 reply; 5+ messages in thread
From: Biju Das @ 2022-06-21  8:40 UTC (permalink / raw)
  To: Phil Edworthy, Heikki Krogerus; +Cc: Aswath Govindraju, linux-usb

Hi Phil,

> Subject: RE: usb: typec: driver for TI HD3SS3220 USB Type-C DRP port
> controller question
> 
> Hi Heikki,
> 
> On 21 June 2022 08:23 Heikki Krogerus wrote:
> > On Mon, Jun 20, 2022 at 09:04:10AM +0000, Phil Edworthy wrote:
> > > Hi Heikki,
> > >
> > > I have a board that uses the TI HD3SS3220 USB Type-C DRP port
> > > controller [1], however it doesn't have the interrupt line
> > > connected. How would you recommend I handle this? Should I get the
> > > driver to poll the i2c registers?
> > >
> > > [1]
> > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/t
> > > ree/drivers/usb/typec/hd3ss3220.c?h=v5.19-rc3
> >
> > If you have some other way of detecting connections on your system,
> > then we probable could consider some kind of notifier, but as a
> > general solution for the lack of interrupt, I think polling is the
> > only way.
> Thanks for your comments.
> 
> I wonder if this is a problem that affects quite a few drivers, where a
> generic polling solution can be used instead of interrupts. This would
> require a driver-specific function that can detect when an interrupt
> would have occurred, e.g. by reading a register via i2c.
> This is already done like that for ethernet PHY interrupts.

You mean like PHY at subsystem level, check IRQ is present in dt or not?, if present use IRQ otherwise
Use polling.


> 
> > I'll add the list, and Aswath and Roger. Aswath and Roger were looking
> > at the same problem with the tps6598x (tipd) driver.
> 
> Thanks
> Phil

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: usb: typec: driver for TI HD3SS3220 USB Type-C DRP port controller question
  2022-06-21  8:40     ` Biju Das
@ 2022-06-21  8:43       ` Phil Edworthy
  2022-06-21  9:04         ` Biju Das
  0 siblings, 1 reply; 5+ messages in thread
From: Phil Edworthy @ 2022-06-21  8:43 UTC (permalink / raw)
  To: Biju Das, Heikki Krogerus; +Cc: Aswath Govindraju, linux-usb

Hi Biju,

On 21 June 2022 09:40 Biju Das wrote:
> > On 21 June 2022 08:23 Heikki Krogerus wrote:
> > > On Mon, Jun 20, 2022 at 09:04:10AM +0000, Phil Edworthy wrote:
> > > > Hi Heikki,
> > > >
> > > > I have a board that uses the TI HD3SS3220 USB Type-C DRP port
> > > > controller [1], however it doesn't have the interrupt line
> > > > connected. How would you recommend I handle this? Should I get the
> > > > driver to poll the i2c registers?
> > > >
> > > > [1]
> > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/t
> > > > ree/drivers/usb/typec/hd3ss3220.c?h=v5.19-rc3
> > >
> > > If you have some other way of detecting connections on your system,
> > > then we probable could consider some kind of notifier, but as a
> > > general solution for the lack of interrupt, I think polling is the
> > > only way.
> > Thanks for your comments.
> >
> > I wonder if this is a problem that affects quite a few drivers, where a
> > generic polling solution can be used instead of interrupts. This would
> > require a driver-specific function that can detect when an interrupt
> > would have occurred, e.g. by reading a register via i2c.
> > This is already done like that for ethernet PHY interrupts.
> 
> You mean like PHY at subsystem level, check IRQ is present in dt or not?,
> if present use IRQ otherwise
> Use polling.
Indeed, but something that could be used for _all_ i2c devices.
 
Thanks
Phil

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: usb: typec: driver for TI HD3SS3220 USB Type-C DRP port controller question
  2022-06-21  8:43       ` Phil Edworthy
@ 2022-06-21  9:04         ` Biju Das
  0 siblings, 0 replies; 5+ messages in thread
From: Biju Das @ 2022-06-21  9:04 UTC (permalink / raw)
  To: Phil Edworthy, Heikki Krogerus; +Cc: Aswath Govindraju, linux-usb

Hi Phil,

> Subject: RE: usb: typec: driver for TI HD3SS3220 USB Type-C DRP port
> controller question
> 
> Hi Biju,
> 
> On 21 June 2022 09:40 Biju Das wrote:
> > > On 21 June 2022 08:23 Heikki Krogerus wrote:
> > > > On Mon, Jun 20, 2022 at 09:04:10AM +0000, Phil Edworthy wrote:
> > > > > Hi Heikki,
> > > > >
> > > > > I have a board that uses the TI HD3SS3220 USB Type-C DRP port
> > > > > controller [1], however it doesn't have the interrupt line
> > > > > connected. How would you recommend I handle this? Should I get
> > > > > the driver to poll the i2c registers?
> > > > >
> > > > > [1]
> > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.g
> > > > > it/t
> > > > > ree/drivers/usb/typec/hd3ss3220.c?h=v5.19-rc3
> > > >
> > > > If you have some other way of detecting connections on your
> > > > system, then we probable could consider some kind of notifier, but
> > > > as a general solution for the lack of interrupt, I think polling
> > > > is the only way.
> > > Thanks for your comments.
> > >
> > > I wonder if this is a problem that affects quite a few drivers,
> > > where a generic polling solution can be used instead of interrupts.
> > > This would require a driver-specific function that can detect when
> > > an interrupt would have occurred, e.g. by reading a register via
> i2c.
> > > This is already done like that for ethernet PHY interrupts.
> >
> > You mean like PHY at subsystem level, check IRQ is present in dt or
> > not?, if present use IRQ otherwise Use polling.
> Indeed, but something that could be used for _all_ i2c devices.

It is not only limited to i2c devices right? It is based on the port controller
devices(eg:-hd3ss20) on various systems. The device info from dt parsed at framework level
and determines which method(IRQ or POLL) needs to be used by the system??

Cheers,
Biju


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-06-21  9:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <TYYPR01MB70867A4B8CEBD6450A239D45F5B09@TYYPR01MB7086.jpnprd01.prod.outlook.com>
2022-06-21  7:23 ` usb: typec: driver for TI HD3SS3220 USB Type-C DRP port controller question Heikki Krogerus
2022-06-21  8:28   ` Phil Edworthy
2022-06-21  8:40     ` Biju Das
2022-06-21  8:43       ` Phil Edworthy
2022-06-21  9:04         ` Biju Das

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.