Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'mfd-fixes-3.14-1' of git://git.linaro.org/people/lee.jones/mfd

Pull MFD fixes from Lee Jones:
"Couple of small issues solved:
- Suspend/Resume call-backs require CONFIG_PM_SLEEP
- Some drivers written for 32bit architectures fail when compiled
with a 64bit compiler. The fixes will future proof the drivers"

* tag 'mfd-fixes-3.14-1' of git://git.linaro.org/people/lee.jones/mfd:
mfd: sec-core: sec_pmic_{suspend,resume}() should depend on CONFIG_PM_SLEEP
mfd: max14577: max14577_{suspend,resume}() should depend on CONFIG_PM_SLEEP
mfd: tps65217: Naturalise cross-architecture discrepancies
mfd: wm8994-core: Naturalise cross-architecture discrepancies
mfd: max8998: Naturalise cross-architecture discrepancies
mfd: max8997: Naturalise cross-architecture discrepancies

+17 -13
+2
drivers/mfd/max14577.c
··· 173 173 }; 174 174 MODULE_DEVICE_TABLE(i2c, max14577_i2c_id); 175 175 176 + #ifdef CONFIG_PM_SLEEP 176 177 static int max14577_suspend(struct device *dev) 177 178 { 178 179 struct i2c_client *i2c = container_of(dev, struct i2c_client, dev); ··· 209 208 210 209 return 0; 211 210 } 211 + #endif /* CONFIG_PM_SLEEP */ 212 212 213 213 static struct of_device_id max14577_dt_match[] = { 214 214 { .compatible = "maxim,max14577", },
+3 -3
drivers/mfd/max8997.c
··· 164 164 return pd; 165 165 } 166 166 167 - static inline int max8997_i2c_get_driver_data(struct i2c_client *i2c, 167 + static inline unsigned long max8997_i2c_get_driver_data(struct i2c_client *i2c, 168 168 const struct i2c_device_id *id) 169 169 { 170 170 if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) { 171 171 const struct of_device_id *match; 172 172 match = of_match_node(max8997_pmic_dt_match, i2c->dev.of_node); 173 - return (int)match->data; 173 + return (unsigned long)match->data; 174 174 } 175 - return (int)id->driver_data; 175 + return id->driver_data; 176 176 } 177 177 178 178 static int max8997_i2c_probe(struct i2c_client *i2c,
+3 -3
drivers/mfd/max8998.c
··· 169 169 return pd; 170 170 } 171 171 172 - static inline int max8998_i2c_get_driver_data(struct i2c_client *i2c, 172 + static inline unsigned long max8998_i2c_get_driver_data(struct i2c_client *i2c, 173 173 const struct i2c_device_id *id) 174 174 { 175 175 if (IS_ENABLED(CONFIG_OF) && i2c->dev.of_node) { 176 176 const struct of_device_id *match; 177 177 match = of_match_node(max8998_dt_match, i2c->dev.of_node); 178 - return (int)(long)match->data; 178 + return (unsigned long)match->data; 179 179 } 180 180 181 - return (int)id->driver_data; 181 + return id->driver_data; 182 182 } 183 183 184 184 static int max8998_i2c_probe(struct i2c_client *i2c,
+2
drivers/mfd/sec-core.c
··· 315 315 return 0; 316 316 } 317 317 318 + #ifdef CONFIG_PM_SLEEP 318 319 static int sec_pmic_suspend(struct device *dev) 319 320 { 320 321 struct i2c_client *i2c = container_of(dev, struct i2c_client, dev); ··· 350 349 351 350 return 0; 352 351 } 352 + #endif /* CONFIG_PM_SLEEP */ 353 353 354 354 static SIMPLE_DEV_PM_OPS(sec_pmic_pm_ops, sec_pmic_suspend, sec_pmic_resume); 355 355
+2 -2
drivers/mfd/tps65217.c
··· 158 158 { 159 159 struct tps65217 *tps; 160 160 unsigned int version; 161 - unsigned int chip_id = ids->driver_data; 161 + unsigned long chip_id = ids->driver_data; 162 162 const struct of_device_id *match; 163 163 bool status_off = false; 164 164 int ret; ··· 170 170 "Failed to find matching dt id\n"); 171 171 return -EINVAL; 172 172 } 173 - chip_id = (unsigned int)(unsigned long)match->data; 173 + chip_id = (unsigned long)match->data; 174 174 status_off = of_property_read_bool(client->dev.of_node, 175 175 "ti,pmic-shutdown-controller"); 176 176 }
+1 -1
drivers/mfd/wm8994-core.c
··· 636 636 if (i2c->dev.of_node) { 637 637 of_id = of_match_device(wm8994_of_match, &i2c->dev); 638 638 if (of_id) 639 - wm8994->type = (int)of_id->data; 639 + wm8994->type = (enum wm8994_type)of_id->data; 640 640 } else { 641 641 wm8994->type = id->driver_data; 642 642 }
+1 -1
include/linux/mfd/max8997-private.h
··· 387 387 struct i2c_client *muic; /* slave addr 0x4a */ 388 388 struct mutex iolock; 389 389 390 - int type; 390 + unsigned long type; 391 391 struct platform_device *battery; /* battery control (not fuel gauge) */ 392 392 393 393 int irq;
+1 -1
include/linux/mfd/max8998-private.h
··· 163 163 int ono; 164 164 u8 irq_masks_cur[MAX8998_NUM_IRQ_REGS]; 165 165 u8 irq_masks_cache[MAX8998_NUM_IRQ_REGS]; 166 - int type; 166 + unsigned long type; 167 167 bool wakeup; 168 168 }; 169 169
+2 -2
include/linux/mfd/tps65217.h
··· 252 252 struct tps65217 { 253 253 struct device *dev; 254 254 struct tps65217_board *pdata; 255 - unsigned int id; 255 + unsigned long id; 256 256 struct regulator_desc desc[TPS65217_NUM_REGULATOR]; 257 257 struct regulator_dev *rdev[TPS65217_NUM_REGULATOR]; 258 258 struct regmap *regmap; ··· 263 263 return dev_get_drvdata(dev); 264 264 } 265 265 266 - static inline int tps65217_chip_id(struct tps65217 *tps65217) 266 + static inline unsigned long tps65217_chip_id(struct tps65217 *tps65217) 267 267 { 268 268 return tps65217->id; 269 269 }