Commit Graph
8 Commits
Author SHA1 Message Date
Stephen Boyd 9d4db2f5f0 bus: sunxi-rsb: Remove dev_err() usage after platform_get_irq()
We don't need dev_err() messages when platform_get_irq() fails now that
platform_get_irq() prints an error message itself when something goes
wrong. Let's remove these prints with a simple semantic patch.

// <smpl>
@@
expression ret;
struct platform_device *E;
@@

ret =
(
platform_get_irq(E, ...)
|
platform_get_irq_byname(E, ...)
);

if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>

While we're here, remove braces on if statements that only have one
statement (manually).

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Chen-Yu Tsai <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
Signed-off-by: Chen-Yu Tsai <[email protected]>
2019-08-06 14:15:49 +08:00
Stefan Brüns e2bf801ecd sunxi-rsb: Include OF based modalias in device uevent
Include the OF-based modalias in the uevent sent when registering devices
on the sunxi RSB bus, so that user space has a chance to autoload the
kernel module for the device.

Fixes a regression caused by commit 3f241bfa60 ("arm64: allwinner: a64:
pine64: Use dcdc1 regulator for mmc0"). When the axp20x-rsb module for
the AXP803 PMIC is built as a module, it is not loaded and the system
ends up with an disfunctional MMC controller.

Fixes: d787dcdb9c ("bus: sunxi-rsb: Add driver for Allwinner Reduced Serial Bus")
Cc: stable <[email protected]> # 4.4.x 7a3b7cd332 of: device: Export of_device_{get_modalias, uvent_modalias} to modules
Acked-by: Chen-Yu Tsai <[email protected]>
Signed-off-by: Stefan Brüns <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
2017-12-05 09:14:30 +01:00
Rob Herring 9c0982d809 bus: Convert to using %pOF instead of full_name
Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.

Signed-off-by: Rob Herring <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Cc: Chen-Yu Tsai <[email protected]>
Cc: [email protected]
Signed-off-by: Arnd Bergmann <[email protected]>
2017-08-16 17:21:40 +02:00
Andre Przywara 2d3e8f7031 drivers: sunxi-rsb: fix error output type
"len" is actually a size_t in this function here, so properly annotate
the dev_err printf type to allow compilation for 64-bit architectures.

Signed-off-by: Andre Przywara <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
2016-01-25 00:00:49 +01:00
Chen-Yu Tsai bccd240fc8 bus: sunxi-rsb: Fix peripheral IC mapping runtime address
0x4e is the runtime address normally associated with perihperal ICs.
0x45 is not a valid runtime address.

Signed-off-by: Chen-Yu Tsai <[email protected]>
Signed-off-by: Olof Johansson <[email protected]>
2015-12-22 11:42:30 -08:00
Chen-Yu Tsai 427d6e4812 bus: sunxi-rsb: Fix primary PMIC mapping hardware address
The primary PMICs use 0x3a3 as their hardware address, not 0x3e3.

Signed-off-by: Chen-Yu Tsai <[email protected]>
Signed-off-by: Olof Johansson <[email protected]>
2015-12-22 11:42:26 -08:00
Dan Carpenter 43675ffafd bus: sunxi-rsb: unlock on error in sunxi_rsb_read()
Don't forget to unlock before returning an error code.

Fixes: d787dcdb9c ('bus: sunxi-rsb: Add driver for Allwinner Reduced Serial Bus')
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Chen-Yu Tsai <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
2015-11-17 09:40:49 +01:00
Chen-Yu Tsai d787dcdb9c bus: sunxi-rsb: Add driver for Allwinner Reduced Serial Bus
Reduced Serial Bus (RSB) is an Allwinner proprietery interface
used to communicate with PMICs and other peripheral ICs.

RSB is a two-wire push-pull serial bus that supports 1 master
device and up to 15 active slave devices.

Signed-off-by: Chen-Yu Tsai <[email protected]>
Reviewed-by: Mark Brown <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Maxime Ripard <[email protected]>
Signed-off-by: Olof Johansson <[email protected]>
2015-10-26 10:11:58 +09:00