Skip to content

Commit 89050b1

Browse files
committed
Revert "Revert "mfd: simple-mfd-i2c: Add configuration for RPi POE HAT""
This reverts commit f57048a.
1 parent 8ae3259 commit 89050b1

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

drivers/mfd/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,16 @@ config MFD_SY7636A
12101210
To enable support for building sub-devices as modules,
12111211
choose M here.
12121212

1213+
config MFD_RASPBERRYPI_POE_HAT
1214+
tristate "Raspberry Pi PoE HAT MFD"
1215+
depends on I2C
1216+
select MFD_SIMPLE_MFD_I2C
1217+
help
1218+
This module supports the PWM fan controller found on the Raspberry Pi
1219+
POE and POE+ HAT boards, and the power supply driver on the POE+ HAT.
1220+
(Functionally it relies on MFD_SIMPLE_MFD_I2C to provide the framework
1221+
that loads the child drivers).
1222+
12131223
config MFD_RDC321X
12141224
tristate "RDC R-321x southbridge"
12151225
select MFD_CORE

drivers/mfd/simple-mfd-i2c.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ static const struct regmap_config regmap_config_8r_8v = {
2929
.val_bits = 8,
3030
};
3131

32+
static const struct regmap_config regmap_config_16r_8v = {
33+
.reg_bits = 16,
34+
.val_bits = 8,
35+
};
36+
37+
static const struct simple_mfd_data rpi_poe_core = {
38+
.regmap_config = &regmap_config_16r_8v,
39+
};
40+
3241
static int simple_mfd_i2c_probe(struct i2c_client *i2c)
3342
{
3443
const struct simple_mfd_data *simple_mfd_data;
@@ -117,6 +126,7 @@ static const struct of_device_id simple_mfd_i2c_of_match[] = {
117126
{ .compatible = "maxim,max5970", .data = &maxim_max5970},
118127
{ .compatible = "maxim,max5978", .data = &maxim_max5970},
119128
{ .compatible = "maxim,max77705-battery", .data = &maxim_mon_max77705},
129+
{ .compatible = "raspberrypi,poe-core", &rpi_poe_core },
120130
{ .compatible = "raspberrypi,sensehat" },
121131
{ .compatible = "silergy,sy7636a", .data = &silergy_sy7636a},
122132
{ .compatible = "spacemit,p1", .data = &spacemit_p1, },

0 commit comments

Comments
 (0)