24 Sep, 2020
1 commit
-
Many hwmon drivers don't use the id information provided by the old
i2c probe function, and the remainder can easily be adapted to the new
form ("probe_new") by calling i2c_match_id explicitly.This avoids scanning the identifier tables during probes.
Drivers which didn't use the id are converted as-is; drivers which did
are modified as follows:* if the information in i2c_client is sufficient, that's used instead
(client->name);
* anything else is handled by calling i2c_match_id() with the same
level of error-handling (if any) as before.A few drivers aren't included in this patch because they have a
different set of maintainers. They will be covered by other patches.Signed-off-by: Stephen Kitt
Link: https://lore.kernel.org/r/20200813160222.1503401-1-steve@sk2.org
Signed-off-by: Guenter Roeck
31 May, 2019
1 commit
-
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later versionextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 3029 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Allison Randal
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman
03 Jan, 2017
1 commit
-
Use DEVICE_ATTR_RO for read-only attributes. This simplifies the source
code, improves readbility, and reduces the chance of inconsistencies.The conversion was done automatically using coccinelle. It was validated
by compiling both the old and the new source code and comparing its text,
data, and bss size.Signed-off-by: Julia Lawall
[groeck: Updated description]
Signed-off-by: Guenter Roeck
03 Dec, 2016
2 commits
-
Support setting the reference voltage from the device tree.
Signed-off-by: Clemens Gruber
Signed-off-by: Guenter Roeck -
Replace S_IRUGO with the better readable 0444.
This fixes a checkpatch warning.Signed-off-by: Clemens Gruber
Signed-off-by: Guenter Roeck
02 Jul, 2015
1 commit
-
The mcp3021 scaling code is dividing the VDD (full-scale) value in
millivolts by the A2D resolution to obtain the scaling factor. When VDD
is 3300mV (the standard value) and the resolution is 12-bit (4096
divisions), the result is a scale factor of 3300/4096, which is always
one. Effectively, the raw A2D reading is always being returned because
no scaling is applied.This patch fixes the issue and simplifies the register-to-volts
calculation, removing the unneeded "output_scale" struct member.Signed-off-by: Nick Stevens
Cc: stable@vger.kernel.org # v3.10+
[Guenter Roeck: Dropped unnecessary value check]
Signed-off-by: Guenter Roeck
12 Aug, 2013
1 commit
-
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.Signed-off-by: Jingoo Han
Signed-off-by: Guenter Roeck
24 Sep, 2012
3 commits
-
This Patch adds support for mcp3221 chip to the
mcp3021 driver.Signed-off-by: Sven Schuchmann
Signed-off-by: Guenter Roeck -
This Patch is to prepare the MCP3021 driver to support
other chips like the MCP3221. The hard defined chip data
is now stored within the data struct of each chip.Signed-off-by: Sven Schuchmann
Signed-off-by: Guenter Roeck -
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Mingkai Hu
Cc: Xie Xiaobo
Signed-off-by: Guenter Roeck
23 Mar, 2012
1 commit
-
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
Signed-off-by: Xie Xiaobo
Signed-off-by: Jean Delvare