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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1493119428.24567.190.camel@linux.intel.com>
Date:   Tue, 25 Apr 2017 14:23:48 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Jan Kiszka <jan.kiszka@...mens.com>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc:     Jonathan Cameron <jic23@...nel.org>, linux-iio@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Sascha Weisenberger <sascha.weisenberger@...mens.com>
Subject: Re: [PATCH] iio: adc: Add support for TI ADC1x8s102

On Tue, 2017-04-25 at 11:32 +0200, Jan Kiszka wrote:
> On 2017-04-25 09:31, Peter Meerwald-Stadler wrote:

+Cc: Mika.

> > I think board-specific stuff should not go into the driver -> DT?
> 
> Unfortunately, we only have half-baked ACPI on those boards.

That's the main problem and still no excuse for uglifying code.

> > > +
> > > +#include <linux/platform_data/adc1x8s102.h>
> > 
> > who needs platform data these days :)
> 
> Apparently, quite a few devices.

New drivers are not supposed to use platform data.

> But the situation here is:
> - Existing hardware has incomplete ACPI description that needs to be
>   augmented by software.

Yes, and this software is called DSDT table in BIOS. Linux kernel has a
support for properly formed table already for few releases.

> - I'm not aware of a complete DT specification for this device. If
>   there is any somewhere, I can happily include it.

Looking to proposed code there is only one property for it, if there is
an existing binding for the same property you may just simple re-use it.

> > > +
> > > +#define ADC1x8S102_GALILEO2_CS	8
> > 
> > this board-specific detail shouldn't be here
> 
> Where should it go then?

Obviously in (properly formed) ACPI.

> no board specific stuff here please
> 
> Needed to make it work. If there is a better file to keep that, I'll
> move it.

Ideally you need BIOS fixed for that.

Otherwise you may do a separate code which would provide CS GPIO look up
table.

Mika, what do you think about fixing this in the C code for existing
devices?

-- 
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ