lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 4 Apr 2019 10:44:59 +0100
From:   Lee Jones <lee.jones@...aro.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] mfd: Add support for Merrifield Basin Cove PMIC

On Thu, 04 Apr 2019, Andy Shevchenko wrote:

> On Thu, Apr 04, 2019 at 10:03:14AM +0100, Lee Jones wrote:
> > On Thu, 04 Apr 2019, Andy Shevchenko wrote:
> > > On Thu, Apr 04, 2019 at 08:03:57AM +0100, Lee Jones wrote:
> > > > On Thu, 04 Apr 2019, Lee Jones wrote:
> > > > > On Tue, 02 Apr 2019, Andy Shevchenko wrote:
> > > > > > On Tue, Apr 02, 2019 at 06:12:11AM +0100, Lee Jones wrote:
> > > > > > > On Mon, 18 Mar 2019, Andy Shevchenko wrote:
> 
> > > > > > > Although succinct, dragging values from one platform device into
> > > > > > > another doesn't sound that neat.
> > > > > > 
> > > > > > So, how to split resources given in one _physical_ multi-functional device to
> > > > > > several of them?  Isn't it what MFD framework for?
> > > > > > 
> > > > > > Any other approach here? I'm all ears!
> > > > > 
> > > > > From the child:
> > > > > 
> > > > >   platform_get_irq(dev->parent, CLIENT_ID);
> > > 
> > > So, instead of keeping a fragile approach in one driver, we will spread this
> > > to all of them.
> > 
> > No, the fragileness goes away with implicit definitions of IDs.
> 
> Did you mean "explicit"?

Yes.  Thank you for correcting my English. :)

> Something like we need to have a shared map of those indices?

Defining the IDs of the devices would lead to a more robust
implementation, yes.

> > > > > > > Also, since the ordering of the
> > > > > > > devices is critical in this implementation, it also comes across as
> > > > > > > fragile.
> > > > > > 
> > > > > > How fragile? In ACPI we don't have IRQ labeling scheme. Index is used for that.
> > > > > > 
> > > > > > > Any reason why ACPI can't register all of the child devices, or for
> > > > > > > the child devices to obtain their IRQ directly from the tables?
> > > > > > 
> > > > > > And how are we supposed to enumerated them taking into consideration single
> > > > > > ACPI ID given?
> > > > > 
> > > > > This question was a little whimsical, since I have no idea how the
> > > > > ACPI tables you're working with are laid out.
> > > 
> > > There is one device node with several IRQ and other resources.
> > > In pseudo code:
> > > 
> > > 	device node {
> > > 		device ID,
> > > 		IRQ 0,
> > > 		IRQ 1,
> > > 		...
> > > 		MMIO 0,
> > > 		...
> > > 	}
> > 
> > Sure.  Thanks for the explanation.
> > 
> > Very well.  I guess it's not too bad as it is.
> 
> It represent real hardware 1:1.
> Just out of curiosity how this case can be described in DT?

In DT you can have a sub-node for each child which can contain the
IRQ.  Without a sub-node you would define the IRQs in this file.  If
these IRQs do not change, that option is still available to you.

I can't think of an example where all of the children's IRQs have been
listed in the parent's DT node in this way.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ