Power Supply Fixes for 4.8 cycle
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCgAGBQJXsk2BAAoJENju1/PIO/qa0E4P/0rsS4Kzv+B61BJsoCIoXYOp p347gy6fS7QEJxSlHG430uVV74zlXQE3JTiBrjIdX2TKRA6EvD0RyM3/h+vfQU1c GviBJ53UwNlq1bBuJD1jkIHCvIW274FjX1h45Tytuzsi/8rLWas15oumnRFuOtyA UtgTbPtualYab01XgQyivv/dY4Dfb3d0aNPl3Nq77hAJMTVc9s1DLVqRMudqc0Zc e489mw+8l31L2pJs7CPxzNXqlS4YvMz4/mwbGCsqtEJTNHyzyrVH5VfCpMUNfGr4 rZdqtF/nj/9c/DTIO6GvhoOVjja4MCEf3WpGCxrz2KUmhvxVTeBqsPStjE1xnC8u rNDDpRAwtjgpiw8fiEw+CXB5XsDMPmMSJi1KaOLz1q9O2GxHzoz2tgfjCh9V73qj J5pq1cQY2V6AkB+10WQ7afCnN3Zn2qDUoWXj2cvkd8yuvyfjTuC53Gd1sGpNk1dj f+euFLm6YYMvLv37vDCQDaxvzmud1Z60bgJy/uvbaVhcCABLUdbfwJpRf/3tWjp3 rU3Lw43p5MPfBWHkZrzpQO33GEzO6FSrIkTr3YfVJiwAoViXgt5WEknbVde/pZDz Acn8UTE+6KeLrmrwA66pF++ewKjA7GgUzW50Ubju15rWujnwu5QVg/T+UVpGrB4k OYmwCtd5i2/OjnC+APnK =hK7R -----END PGP SIGNATURE----- Merge tag 'for-v4.8-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply fixes from Sebastian Reichel. * tag 'for-v4.8-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power_supply: tps65217-charger: fix missing platform_set_drvdata() power: reset: hisi-reboot: Unmap region obtained by of_iomap power: reset: reboot-mode: fix build error of missing ioremap/iounmap on UM power: supply: max17042_battery: fix model download bug.
This commit is contained in:
commit
5ff132c07a
@ -457,13 +457,16 @@ static inline void max17042_write_model_data(struct max17042_chip *chip,
|
||||
}
|
||||
|
||||
static inline void max17042_read_model_data(struct max17042_chip *chip,
|
||||
u8 addr, u32 *data, int size)
|
||||
u8 addr, u16 *data, int size)
|
||||
{
|
||||
struct regmap *map = chip->regmap;
|
||||
int i;
|
||||
u32 tmp;
|
||||
|
||||
for (i = 0; i < size; i++)
|
||||
regmap_read(map, addr + i, &data[i]);
|
||||
for (i = 0; i < size; i++) {
|
||||
regmap_read(map, addr + i, &tmp);
|
||||
data[i] = (u16)tmp;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int max17042_model_data_compare(struct max17042_chip *chip,
|
||||
@ -486,7 +489,7 @@ static int max17042_init_model(struct max17042_chip *chip)
|
||||
{
|
||||
int ret;
|
||||
int table_size = ARRAY_SIZE(chip->pdata->config_data->cell_char_tbl);
|
||||
u32 *temp_data;
|
||||
u16 *temp_data;
|
||||
|
||||
temp_data = kcalloc(table_size, sizeof(*temp_data), GFP_KERNEL);
|
||||
if (!temp_data)
|
||||
@ -501,7 +504,7 @@ static int max17042_init_model(struct max17042_chip *chip)
|
||||
ret = max17042_model_data_compare(
|
||||
chip,
|
||||
chip->pdata->config_data->cell_char_tbl,
|
||||
(u16 *)temp_data,
|
||||
temp_data,
|
||||
table_size);
|
||||
|
||||
max10742_lock_model(chip);
|
||||
@ -514,7 +517,7 @@ static int max17042_verify_model_lock(struct max17042_chip *chip)
|
||||
{
|
||||
int i;
|
||||
int table_size = ARRAY_SIZE(chip->pdata->config_data->cell_char_tbl);
|
||||
u32 *temp_data;
|
||||
u16 *temp_data;
|
||||
int ret = 0;
|
||||
|
||||
temp_data = kcalloc(table_size, sizeof(*temp_data), GFP_KERNEL);
|
||||
|
@ -200,8 +200,8 @@ config REBOOT_MODE
|
||||
config SYSCON_REBOOT_MODE
|
||||
tristate "Generic SYSCON regmap reboot mode driver"
|
||||
depends on OF
|
||||
depends on MFD_SYSCON
|
||||
select REBOOT_MODE
|
||||
select MFD_SYSCON
|
||||
help
|
||||
Say y here will enable reboot mode driver. This will
|
||||
get reboot mode arguments and store it in SYSCON mapped
|
||||
|
@ -53,13 +53,16 @@ static int hisi_reboot_probe(struct platform_device *pdev)
|
||||
|
||||
if (of_property_read_u32(np, "reboot-offset", &reboot_offset) < 0) {
|
||||
pr_err("failed to find reboot-offset property\n");
|
||||
iounmap(base);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
err = register_restart_handler(&hisi_restart_nb);
|
||||
if (err)
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "cannot register restart handler (err=%d)\n",
|
||||
err);
|
||||
iounmap(base);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
@ -206,6 +206,7 @@ static int tps65217_charger_probe(struct platform_device *pdev)
|
||||
if (!charger)
|
||||
return -ENOMEM;
|
||||
|
||||
platform_set_drvdata(pdev, charger);
|
||||
charger->tps = tps;
|
||||
charger->dev = &pdev->dev;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user