Re: [PATCH V2] hwmon: Add MCP3021 hardware monitoring driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2012-02-08 at 17:00 -0500, Jean Delvare wrote:
> Hi Xie,
> 
> On Sun, 5 Feb 2012 20:33:38 +0800, Xie Xiaobo wrote:
> > Add I2C driver for MCP3021 that is an ADC chip from Microchip.
> > The MCP3021 is a successive approximation A/D converter (ADC)
> > with 10-bit resolution.
> > The driver export the value of Vin to sysfs, the voltage unit is
> > mV. Through the sysfs interface, lm-sensors tool can also display
> > Vin voltage.
> > 
> > Signed-off-by: Mingkai Hu <Mingkai.hu@xxxxxxxxxxxxx>
> > Signed-off-by: Xie Xiaobo <X.Xie@xxxxxxxxxxxxx>
> > ---
> > ---
> 
Odd, I didn't get a copy of this patch. Guess I am fighting with the
corporate e-mail system again :(. Thanks for looking into it.

Additional minor comment below.

[ ... ]

> > +
> > +static int __init mcp3021_init(void)
> > +{
> > +	return i2c_add_driver(&mcp3021_driver);
> > +}
> > +
> > +static void __exit mcp3021_exit(void)
> > +{
> > +	i2c_del_driver(&mcp3021_driver);
> > +}
> > +
> > +MODULE_AUTHOR("Mingkai Hu <Mingkai.hu@xxxxxxxxxxxxx>");
> > +MODULE_DESCRIPTION("Microchip MCP3021 driver");
> > +MODULE_LICENSE("GPL");
> > +
> > +module_init(mcp3021_init);
> > +module_exit(mcp3021_exit);
> 

The init/exit functions and module_init/module_exit can now be replaced
with module_i2c_driver(mcp3021_driver);

Guenter



_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux