Hello. > On Fri, Nov 22, 2013 at 07:53:35PM +0400, Alexander Shiyan wrote: > > This patch adds support for Freescale MMA7455L/MMA7456L 3-Axis > > Accelerometer connected to I2C bus. Driver can be loaded ether > > with or without DT support. The basic parameters of the driver > > can be changed through sysfs. > > The driver looks sane but I am hesitant with the sysfs interface. For a > while I asked accelerometer guys to standardize on sysfs attributes > applicable to all input-related 3-axis accelerometers, but I have not > seen a concrete proposal thus far. > > If you remove sysfs portions I can merge it as pure input driver now. Without sysfs we can not tune device parameters, so only my default values will be used, that may not be suitable for other users. What are the alternatives? procfs and ioctl. Not sure it's better ... ... > > diff --git a/drivers/input/misc/mma745xl.c b/drivers/input/misc/mma745xl.c ... > > +static int mma745xl_probe(struct i2c_client *client, > > + const struct i2c_device_id *id) > > +{ ... > > + input_set_drvdata(input, priv); > > + dev_set_drvdata(&client->dev, input); > > i2c_set_clientdata() Device also can be used through SPI. If anyone will make support for this, we can just put the initialization in a single function, leaving only the regmap initialization related to bus. Using dev_set_drvdata is more generic here. Not think so? Thanks. --- ��.n��������+%������w��{.n����z�{��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f