mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
drivers: hwmon: (pmbus/ltc2978) Add support for LTM4686 uModule
This patch adds support for LTM4686 Ultrathin Dual 10A or Single 20A uModule Regulator with Digital Power System Management. Datasheet: http://www.analog.com/ltm4686 Signed-off-by: Michael Hennerich <[email protected]> Signed-off-by: Guenter Roeck <[email protected]>
This commit is contained in:
parent
0238df646e
commit
4e15d05d9c
4 changed files with 17 additions and 2 deletions
|
|
@ -83,7 +83,8 @@ config SENSORS_LTC2978_REGULATOR
|
|||
depends on SENSORS_LTC2978 && REGULATOR
|
||||
help
|
||||
If you say yes here you get regulator support for Linear
|
||||
Technology LTC2974, LTC2977, LTC2978, LTC3880, LTC3883, and LTM4676.
|
||||
Technology LTC2974, LTC2977, LTC2978, LTC3880, LTC3883, LTM4676
|
||||
and LTM4686.
|
||||
|
||||
config SENSORS_LTC3815
|
||||
tristate "Linear Technologies LTC3815"
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (c) 2011 Ericsson AB.
|
||||
* Copyright (c) 2013, 2014, 2015 Guenter Roeck
|
||||
* Copyright (c) 2015 Linear Technology
|
||||
* Copyright (c) 2018 Analog Devices Inc.
|
||||
*
|
||||
* 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
|
||||
|
|
@ -28,7 +29,7 @@
|
|||
#include "pmbus.h"
|
||||
|
||||
enum chips { ltc2974, ltc2975, ltc2977, ltc2978, ltc2980, ltc3880, ltc3882,
|
||||
ltc3883, ltc3886, ltc3887, ltm2987, ltm4675, ltm4676 };
|
||||
ltc3883, ltc3886, ltc3887, ltm2987, ltm4675, ltm4676, ltm4686 };
|
||||
|
||||
/* Common for all chips */
|
||||
#define LTC2978_MFR_VOUT_PEAK 0xdd
|
||||
|
|
@ -81,6 +82,7 @@ enum chips { ltc2974, ltc2975, ltc2977, ltc2978, ltc2980, ltc3880, ltc3882,
|
|||
#define LTM4676_ID_REV1 0x4400
|
||||
#define LTM4676_ID_REV2 0x4480
|
||||
#define LTM4676A_ID 0x47e0
|
||||
#define LTM4686_ID 0x4770
|
||||
|
||||
#define LTC2974_NUM_PAGES 4
|
||||
#define LTC2978_NUM_PAGES 8
|
||||
|
|
@ -512,6 +514,7 @@ static const struct i2c_device_id ltc2978_id[] = {
|
|||
{"ltm2987", ltm2987},
|
||||
{"ltm4675", ltm4675},
|
||||
{"ltm4676", ltm4676},
|
||||
{"ltm4686", ltm4686},
|
||||
{}
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, ltc2978_id);
|
||||
|
|
@ -588,6 +591,8 @@ static int ltc2978_get_id(struct i2c_client *client)
|
|||
else if (chip_id == LTM4676_ID_REV1 || chip_id == LTM4676_ID_REV2 ||
|
||||
chip_id == LTM4676A_ID)
|
||||
return ltm4676;
|
||||
else if (chip_id == LTM4686_ID)
|
||||
return ltm4686;
|
||||
|
||||
dev_err(&client->dev, "Unsupported chip ID 0x%x\n", chip_id);
|
||||
return -ENODEV;
|
||||
|
|
@ -684,6 +689,7 @@ static int ltc2978_probe(struct i2c_client *client,
|
|||
case ltc3887:
|
||||
case ltm4675:
|
||||
case ltm4676:
|
||||
case ltm4686:
|
||||
data->features |= FEAT_CLEAR_PEAKS | FEAT_NEEDS_POLLING;
|
||||
info->read_word_data = ltc3880_read_word_data;
|
||||
info->pages = LTC3880_NUM_PAGES;
|
||||
|
|
@ -770,6 +776,7 @@ static const struct of_device_id ltc2978_of_match[] = {
|
|||
{ .compatible = "lltc,ltm2987" },
|
||||
{ .compatible = "lltc,ltm4675" },
|
||||
{ .compatible = "lltc,ltm4676" },
|
||||
{ .compatible = "lltc,ltm4686" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, ltc2978_of_match);
|
||||
|
|
|
|||
Loading…
Reference in a new issue