From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f193.google.com ([209.85.192.193]:35786 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750964AbdBXJJ0 (ORCPT ); Fri, 24 Feb 2017 04:09:26 -0500 Date: Fri, 24 Feb 2017 17:06:13 +0800 From: Eva Rachel Retuya To: Andy Shevchenko Cc: Jonathan Cameron , linux-iio@vger.kernel.org, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald , Dmitry Torokhov , Michael Hennerich , Daniel Baluta , Alison Schofield , Florian Vaussard , "linux-kernel@vger.kernel.org" , Rob Herring , Mark Rutland , devicetree Subject: Re: [PATCH v3 3/4] iio: accel: adxl345: Split driver into core and I2C Message-ID: <20170224090611.GB5012@Socrates-UM> References: <68ce56410416b439bd59a8e2f4fe294a48cb5fad.1487757223.git.eraretuya@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Sender: linux-iio-owner@vger.kernel.org List-Id: linux-iio@vger.kernel.org On Thu, Feb 23, 2017 at 06:36:42PM +0200, Andy Shevchenko wrote: > On Wed, Feb 22, 2017 at 12:23 PM, Eva Rachel Retuya wrote: > > Move I2C-specific code into its own file and rely on regmap to access > > registers. The core code provides access to x, y, z and scale readings. > > Like Lars already pointed to possibility of use of this in ACPI based > platforms, I would add a reference to > commit 01427fe7c4b9 ("Input: adxl34x - make it enumerable in ACPI environment"). > > Please fix your patches accordingly. > Ack. Thank you for pointing this out. I'm not aware of the said commit. Eva > > > +static const struct i2c_device_id adxl345_i2c_id[] = { > > + { "adxl345", 0 }, > > + { } > > +}; > > + > > +MODULE_DEVICE_TABLE(i2c, adxl345_i2c_id); > > + > > +#ifdef CONFIG_OF > > +static const struct of_device_id adxl345_of_match[] = { > > + { .compatible = "adi,adxl345" }, > > + { }, > > +}; > > + > > +MODULE_DEVICE_TABLE(of, adxl345_of_match); > > +#endif > > + > > +static struct i2c_driver adxl345_i2c_driver = { > > + .driver = { > > + .name = "adxl345_i2c", > > + .of_match_table = of_match_ptr(adxl345_of_match), > > + }, > > + .probe = adxl345_i2c_probe, > > + .remove = adxl345_i2c_remove, > > + .id_table = adxl345_i2c_id, > > +}; > > + > > +module_i2c_driver(adxl345_i2c_driver); > > + > > +MODULE_AUTHOR("Eva Rachel Retuya "); > > +MODULE_DESCRIPTION("ADXL345 3-Axis Digital Accelerometer I2C driver"); > > +MODULE_LICENSE("GPL v2"); > > > -- > With Best Regards, > Andy Shevchenko