Revert "hwmon: (max16065) Fix alarm attributes"
This reverts commit d7a7dd2966
which is
commit 119abf7d1815f098f7f91ae7abc84324a19943d7 upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: I8630a6c46b19589150df1ee35a6b1b00d5105984
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
246d613c20
commit
9c428fa328
@ -79,7 +79,7 @@ static const bool max16065_have_current[] = {
|
||||
};
|
||||
|
||||
struct max16065_data {
|
||||
enum chips chip;
|
||||
enum chips type;
|
||||
struct i2c_client *client;
|
||||
const struct attribute_group *groups[4];
|
||||
struct mutex update_lock;
|
||||
@ -162,17 +162,10 @@ static struct max16065_data *max16065_update_device(struct device *dev)
|
||||
MAX16065_CURR_SENSE);
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
for (i = 0; i < DIV_ROUND_UP(data->num_adc, 8); i++)
|
||||
data->fault[i]
|
||||
= i2c_smbus_read_byte_data(client, MAX16065_FAULT(i));
|
||||
|
||||
/*
|
||||
* MAX16067 and MAX16068 have separate undervoltage and
|
||||
* overvoltage alarm bits. Squash them together.
|
||||
*/
|
||||
if (data->chip == max16067 || data->chip == max16068)
|
||||
data->fault[0] |= data->fault[1];
|
||||
|
||||
data->last_updated = jiffies;
|
||||
data->valid = 1;
|
||||
}
|
||||
@ -521,7 +514,6 @@ static int max16065_probe(struct i2c_client *client)
|
||||
if (unlikely(!data))
|
||||
return -ENOMEM;
|
||||
|
||||
data->chip = chip;
|
||||
data->client = client;
|
||||
mutex_init(&data->update_lock);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user