mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
at24 updates for v7.0-rc1
- add a set of new compatibles to DT bindings - use dev_err_probe() consistently in the driver -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEkeUTLeW1Rh17omX8BZ0uy/82hMMFAmlwoYAACgkQBZ0uy/82 hMP0ThAAl59j1hCmaOOYBDzihyD9ZhEjHDciB9rYMZmKrfSBYXMPV5E2SIJdJdty V5Eu7K2ERy8i1dho30R5ReyjB341PP9xlt7syOsCoLd5q5tOdO4mhRqNjdCukVOW Zr1M17qE04Z16ZN2QiOavUCYZJOdGZWyNA3Adr2KjUSdkeQwm5H6q/hlwwIGYjJn Ep+bUrmomeZfrFOaIKBKSgwVzFxqfMzV/hhZWWRw8/qWnm0kJtOF0ofNvpTwCcFv REgASGdRtWodxrXx7D/w2HMEIFwbm6fCqR+iT9oBX2nXDDO373XLs7EDeF3PK4Vi Fhm/60GrdCIonsomzV0MT6YprACyFOg5UJj1PmUzcLPtoFTx9GwqQPp/PYBhLuIq tKbCwywpve87wqwXF968kHMwM2sChhXTj2IyrOHz1SQN8RmmJ6MLQcq+j+KADJed wz17EbylHVgVTf5YEcDRNxG42ojw0hKIXpXoEs6nLElFvmAduL8rrhTqJpo6Fvbd XZJwd0WXca/eNM05mtkT7bcUM7Wu/r45nKrCmKrXmPei7NcQ6jElGQUwIp8kHByg gpkuU53dbKdXT7+1zz/Oo5hLwWLaoQ5ha2vGPMkHxvPUs/5KxgIFXAXxsOGavhQl CyNEsCO7BlVWPpcAmwYS0LJXVZ8C4+xsyGCM2vIkpOF87U7bV5c= =m3ZV -----END PGP SIGNATURE----- Merge tag 'at24-updates-for-v7.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-mergewindow at24 updates for v7.0-rc1 - add a set of new compatibles to DT bindings - use dev_err_probe() consistently in the driver
This commit is contained in:
commit
756b7b8d0a
|
|
@ -116,6 +116,7 @@ properties:
|
|||
- const: atmel,24c02
|
||||
- items:
|
||||
- enum:
|
||||
- belling,bl24c04a
|
||||
- giantec,gt24c04a
|
||||
- onnn,cat24c04
|
||||
- onnn,cat24c05
|
||||
|
|
@ -124,6 +125,7 @@ properties:
|
|||
- items:
|
||||
- enum:
|
||||
- belling,bl24c16a
|
||||
- belling,bl24c16f
|
||||
- renesas,r1ex24016
|
||||
- const: atmel,24c16
|
||||
- items:
|
||||
|
|
@ -132,6 +134,7 @@ properties:
|
|||
- items:
|
||||
- enum:
|
||||
- belling,bl24s64
|
||||
- giantec,gt24p64a
|
||||
- onnn,n24s64b
|
||||
- puya,p24c64f
|
||||
- const: atmel,24c64
|
||||
|
|
@ -139,6 +142,7 @@ properties:
|
|||
- enum:
|
||||
- giantec,gt24p128e
|
||||
- giantec,gt24p128f
|
||||
- puya,p24c128f
|
||||
- renesas,r1ex24128
|
||||
- samsung,s524ad0xd1
|
||||
- const: atmel,24c128
|
||||
|
|
|
|||
|
|
@ -657,10 +657,8 @@ static int at24_probe(struct i2c_client *client)
|
|||
if (!i2c_fn_i2c && !i2c_fn_block)
|
||||
page_size = 1;
|
||||
|
||||
if (!page_size) {
|
||||
dev_err(dev, "page_size must not be 0!\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!page_size)
|
||||
return dev_err_probe(dev, -EINVAL, "page_size must not be 0!\n");
|
||||
|
||||
if (!is_power_of_2(page_size))
|
||||
dev_warn(dev, "page_size looks suspicious (no power of 2)!\n");
|
||||
|
|
@ -674,11 +672,9 @@ static int at24_probe(struct i2c_client *client)
|
|||
(flags & AT24_FLAG_ADDR16) ? 65536 : 256);
|
||||
}
|
||||
|
||||
if ((flags & AT24_FLAG_SERIAL) && (flags & AT24_FLAG_MAC)) {
|
||||
dev_err(dev,
|
||||
"invalid device data - cannot have both AT24_FLAG_SERIAL & AT24_FLAG_MAC.");
|
||||
return -EINVAL;
|
||||
}
|
||||
if ((flags & AT24_FLAG_SERIAL) && (flags & AT24_FLAG_MAC))
|
||||
return dev_err_probe(dev, -EINVAL,
|
||||
"invalid device data - cannot have both AT24_FLAG_SERIAL & AT24_FLAG_MAC.");
|
||||
|
||||
regmap_config.val_bits = 8;
|
||||
regmap_config.reg_bits = (flags & AT24_FLAG_ADDR16) ? 16 : 8;
|
||||
|
|
@ -759,10 +755,8 @@ static int at24_probe(struct i2c_client *client)
|
|||
full_power = acpi_dev_state_d0(&client->dev);
|
||||
if (full_power) {
|
||||
err = regulator_enable(at24->vcc_reg);
|
||||
if (err) {
|
||||
dev_err(dev, "Failed to enable vcc regulator\n");
|
||||
return err;
|
||||
}
|
||||
if (err)
|
||||
return dev_err_probe(dev, err, "Failed to enable vcc regulator\n");
|
||||
|
||||
pm_runtime_set_active(dev);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user