public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] extcon: Provide *extcon_*_notifier_all() stubs for !CONFIG_EXTCON
@ 2021-03-12 14:10 Sebastian Andrzej Siewior
  2021-03-12 14:45 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Andrzej Siewior @ 2021-03-12 14:10 UTC (permalink / raw)
  To: Timon Baetz, linux-pm, linux-kernel
  Cc: Krzysztof Kozlowski, sebastian.reichel, Liam Girdwood, Mark Brown,
	Thomas Gleixner, MyungJoo Ham, Chanwoo Choi

CHARGER_MAX8997 fails to compile without CONFIG_EXTCON. There are stubs
already present for *extcon_*_notifier() but are missing for the _all()
variant.

Add *extcon_*_notifier_all() stubs for !CONFIG_EXTCON.

Fixes: f384989e88d44 ("power: supply: max8997_charger: Set CHARGER current limit")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 include/linux/extcon.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/include/linux/extcon.h b/include/linux/extcon.h
index fd183fb9c20f7..8246307f9ed38 100644
--- a/include/linux/extcon.h
+++ b/include/linux/extcon.h
@@ -276,6 +276,30 @@ static inline struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name)
 	return ERR_PTR(-ENODEV);
 }
 
+static inline int extcon_register_notifier_all(struct extcon_dev *edev,
+					       struct notifier_block *nb)
+{
+	return -EINVAL;
+}
+
+static inline int extcon_unregister_notifier_all(struct extcon_dev *edev,
+						 struct notifier_block *nb)
+{
+	return 0;
+}
+
+static inline int devm_extcon_register_notifier_all(struct device *dev,
+						    struct extcon_dev *edev,
+						    struct notifier_block *nb)
+{
+	return -EINVAL;
+}
+
+static inline void devm_extcon_unregister_notifier_all(struct device *dev,
+						       struct extcon_dev *edev,
+						       struct notifier_block *nb)
+{ }
+
 static inline struct extcon_dev *extcon_find_edev_by_node(struct device_node *node)
 {
 	return ERR_PTR(-ENODEV);
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] extcon: Provide *extcon_*_notifier_all() stubs for !CONFIG_EXTCON
  2021-03-12 14:10 [PATCH] extcon: Provide *extcon_*_notifier_all() stubs for !CONFIG_EXTCON Sebastian Andrzej Siewior
@ 2021-03-12 14:45 ` Krzysztof Kozlowski
  2021-03-12 14:53   ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2021-03-12 14:45 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: Timon Baetz, linux-pm, linux-kernel@vger.kernel.org,
	sebastian.reichel, Liam Girdwood, Mark Brown, Thomas Gleixner,
	MyungJoo Ham, Chanwoo Choi

On Fri, 12 Mar 2021 at 15:10, Sebastian Andrzej Siewior
<bigeasy@linutronix.de> wrote:
>
> CHARGER_MAX8997 fails to compile without CONFIG_EXTCON. There are stubs
> already present for *extcon_*_notifier() but are missing for the _all()
> variant.
>
> Add *extcon_*_notifier_all() stubs for !CONFIG_EXTCON.
>
> Fixes: f384989e88d44 ("power: supply: max8997_charger: Set CHARGER current limit")
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
>  include/linux/extcon.h | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)

Thanks for the patch.

Fix was sent some time ago and is already in extcon tree:
https://lore.kernel.org/lkml/20210215100610.19911-2-cw00.choi@samsung.com/

Did you base your work on next?

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] extcon: Provide *extcon_*_notifier_all() stubs for !CONFIG_EXTCON
  2021-03-12 14:45 ` Krzysztof Kozlowski
@ 2021-03-12 14:53   ` Sebastian Andrzej Siewior
  2021-03-12 14:53     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Andrzej Siewior @ 2021-03-12 14:53 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Timon Baetz, linux-pm, linux-kernel@vger.kernel.org,
	sebastian.reichel, Liam Girdwood, Mark Brown, Thomas Gleixner,
	MyungJoo Ham, Chanwoo Choi

On 2021-03-12 15:45:48 [+0100], Krzysztof Kozlowski wrote:
> Did you base your work on next?

no, -rc2.

> Best regards,
> Krzysztof

Sebastian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] extcon: Provide *extcon_*_notifier_all() stubs for !CONFIG_EXTCON
  2021-03-12 14:53   ` Sebastian Andrzej Siewior
@ 2021-03-12 14:53     ` Krzysztof Kozlowski
  2021-03-12 14:55       ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2021-03-12 14:53 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: Timon Baetz, linux-pm, linux-kernel@vger.kernel.org,
	sebastian.reichel, Liam Girdwood, Mark Brown, Thomas Gleixner,
	MyungJoo Ham, Chanwoo Choi

On 12/03/2021 15:53, Sebastian Andrzej Siewior wrote:
> On 2021-03-12 15:45:48 [+0100], Krzysztof Kozlowski wrote:
>> Did you base your work on next?
> 
> no, -rc2.

Yeah, it missed the merge window...

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] extcon: Provide *extcon_*_notifier_all() stubs for !CONFIG_EXTCON
  2021-03-12 14:53     ` Krzysztof Kozlowski
@ 2021-03-12 14:55       ` Sebastian Andrzej Siewior
  2021-03-12 15:35         ` Krzysztof Kozlowski
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Andrzej Siewior @ 2021-03-12 14:55 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Timon Baetz, linux-pm, linux-kernel@vger.kernel.org,
	sebastian.reichel, Liam Girdwood, Mark Brown, Thomas Gleixner,
	MyungJoo Ham, Chanwoo Choi

On 2021-03-12 15:53:53 [+0100], Krzysztof Kozlowski wrote:
> Yeah, it missed the merge window...

Could you please send it for -rc3?

> Best regards,
> Krzysztof

Sebastian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] extcon: Provide *extcon_*_notifier_all() stubs for !CONFIG_EXTCON
  2021-03-12 14:55       ` Sebastian Andrzej Siewior
@ 2021-03-12 15:35         ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2021-03-12 15:35 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: Timon Baetz, linux-pm, linux-kernel@vger.kernel.org,
	sebastian.reichel, Liam Girdwood, Mark Brown, Thomas Gleixner,
	MyungJoo Ham, Chanwoo Choi


On 12/03/2021 15:55, Sebastian Andrzej Siewior wrote:
> On 2021-03-12 15:53:53 [+0100], Krzysztof Kozlowski wrote:
>> Yeah, it missed the merge window...
> 
> Could you please send it for -rc3?

I meant, the pull missed the merge window. Chanwoo already confirmed he
will be sending it for rc3.
https://lore.kernel.org/lkml/6c40afc8-4ea7-aef7-73fd-8935e2bfe0dc@samsung.com/

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-03-12 15:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-12 14:10 [PATCH] extcon: Provide *extcon_*_notifier_all() stubs for !CONFIG_EXTCON Sebastian Andrzej Siewior
2021-03-12 14:45 ` Krzysztof Kozlowski
2021-03-12 14:53   ` Sebastian Andrzej Siewior
2021-03-12 14:53     ` Krzysztof Kozlowski
2021-03-12 14:55       ` Sebastian Andrzej Siewior
2021-03-12 15:35         ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox