Re: [RFC PATCH v4 7/8] pwm: Add dummy pwmchip for orphan pwms

2017-10-17 Thread jeffy
Hi guys, On 10/18/2017 03:05 AM, Mark Brown wrote: On Tue, Oct 17, 2017 at 11:53:01AM -0700, Brian Norris wrote: On Tue, Oct 17, 2017 at 07:46:03PM +0100, Mark Brown wrote: I would expect we can get a long way in the DT by doing a pass over the tree and adding links between device nodes in c

Re: [RFC PATCH v4 7/8] pwm: Add dummy pwmchip for orphan pwms

2017-10-17 Thread Mark Brown
On Tue, Oct 17, 2017 at 11:53:01AM -0700, Brian Norris wrote: > On Tue, Oct 17, 2017 at 07:46:03PM +0100, Mark Brown wrote: > > I would expect we can get a long way in the DT by doing a pass over the > > tree and adding links between device nodes in cases where phandle > > references exist. There

Re: [RFC PATCH v4 7/8] pwm: Add dummy pwmchip for orphan pwms

2017-10-17 Thread Brian Norris
On Tue, Oct 17, 2017 at 07:46:03PM +0100, Mark Brown wrote: > On Tue, Oct 17, 2017 at 11:24:24AM -0700, Dmitry Torokhov wrote: > > On Tue, Oct 17, 2017 at 10:04 AM, Brian Norris > > wrote: > > > > BTW, since you seem to have an opinion about device links: is it > > > expected that all consumer d

Re: [RFC PATCH v4 7/8] pwm: Add dummy pwmchip for orphan pwms

2017-10-17 Thread Mark Brown
On Tue, Oct 17, 2017 at 11:24:24AM -0700, Dmitry Torokhov wrote: > On Tue, Oct 17, 2017 at 10:04 AM, Brian Norris > wrote: > > BTW, since you seem to have an opinion about device links: is it > > expected that all consumer drivers will make explicit calls to > > device_link_add()? I thought this

Re: [RFC PATCH v4 7/8] pwm: Add dummy pwmchip for orphan pwms

2017-10-17 Thread Dmitry Torokhov
On Tue, Oct 17, 2017 at 10:04 AM, Brian Norris wrote: > Hi, > > On Tue, Oct 17, 2017 at 02:40:31PM +0200, Thierry Reding wrote: >> On Tue, Oct 17, 2017 at 06:16:23PM +0800, Jeffy Chen wrote: >> > When the pwm driver is unbound while the pwm is still requested, the >> > pwm core would not actually

Re: [RFC PATCH v4 7/8] pwm: Add dummy pwmchip for orphan pwms

2017-10-17 Thread Brian Norris
Hi, On Tue, Oct 17, 2017 at 02:40:31PM +0200, Thierry Reding wrote: > On Tue, Oct 17, 2017 at 06:16:23PM +0800, Jeffy Chen wrote: > > When the pwm driver is unbound while the pwm is still requested, the > > pwm core would not actually remove the pwmchip(return -EBUSY instead). > > > > So it would

Re: [RFC PATCH v4 7/8] pwm: Add dummy pwmchip for orphan pwms

2017-10-17 Thread Thierry Reding
On Tue, Oct 17, 2017 at 06:16:23PM +0800, Jeffy Chen wrote: > When the pwm driver is unbound while the pwm is still requested, the > pwm core would not actually remove the pwmchip(return -EBUSY instead). > > So it would hold some references to the invalid resources(e.g. pwmchip). > > And the cust

[RFC PATCH v4 7/8] pwm: Add dummy pwmchip for orphan pwms

2017-10-17 Thread Jeffy Chen
When the pwm driver is unbound while the pwm is still requested, the pwm core would not actually remove the pwmchip(return -EBUSY instead). So it would hold some references to the invalid resources(e.g. pwmchip). And the customer who requested the pwm would have those references too, and may cras