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] [day] [month] [year] [list]
Message-ID: <20130821075417.GC4898@intel.com>
Date:	Wed, 21 Aug 2013 10:54:18 +0300
From:	Mika Westerberg <mika.westerberg@...ux.intel.com>
To:	Wolfram Sang <wsa@...-dreams.de>
Cc:	"Rafael J. Wysocki" <rjw@...k.pl>,
	Stephen Warren <swarren@...dotorg.org>,
	linux-i2c@...r.kernel.org, linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Jerry Snitselaar <jerry.snitselaar@...cle.com>
Subject: Re: [PATCH] i2c: move of helpers into the core

On Tue, Aug 20, 2013 at 04:30:43PM +0200, Wolfram Sang wrote:
> On Tue, Aug 20, 2013 at 12:28:13PM +0300, Mika Westerberg wrote:
> > [Added Jerry as he found out a problem when acpi_i2c is being build as a
> > module, this should solve it as well.]
> > 
> > On Tue, Aug 20, 2013 at 01:25:27AM +0200, Rafael J. Wysocki wrote:
> > > On Monday, August 19, 2013 04:56:19 PM Stephen Warren wrote:
> > > > On 08/19/2013 05:04 PM, Rafael J. Wysocki wrote:
> > > > > On Monday, August 19, 2013 03:19:18 PM Wolfram Sang wrote:
> > > > >> I2C of helpers used to live in of_i2c.c but experience (from SPI) shows
> > > > >> that it is much cleaner to have this in the core. This also removes a
> > > > >> circular dependency between the helpers and the core, and so we can
> > > > >> finally register child nodes in the core instead of doing this manually
> > > > >> in each driver. So, fix the drivers and documentation, too.
> > > > > 
> > > > > Perhaps we should do the analogous for ACPI then?
> > 
> > Here is the ACPI version based on the current patch from Wolfram (there is
> > a compile error because of missing dummy implementation of
> > of_i2c_register_devices())
> > 
> > From: Mika Westerberg <mika.westerberg@...ux.intel.com>
> > Subject: [PATCH] i2c: move ACPI helpers into the core
> > 
> > This follows what has already been done for the DeviceTree helpers. Move
> > the ACPI helpers from drivers/acpi/acpi_i2c.c to the I2C core and update
> > documentation accordingly.
> > 
> > This also solves a problem reported by Jerry Snitselaar that we can't build
> > the ACPI I2C helpers as a module.
> > 
> > Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
> 
> Nice, one thing, though:
> 
> >  	/* create pre-declared device nodes */
> >  	of_i2c_register_devices(adap);
> > +	acpi_i2c_register_devices(adap);
> 
> I prefer the if (IS_ENABLED()) solution and will use this in my V2 as
> well.

For the ACPI part we need to have the dummy stub because CONFIG_ACPI is
needed in order to be able to call the ACPI APIs -- there are still
functions that are only available when CONFIG_ACPI is enabled.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ