[2/2] extcon: max77843: add device-tree compatible string

Message ID 20231005104327.981101-2-m.szyprowski@samsung.com
State New
Headers
Series [1/2] extcon: max77693: add device-tree compatible string |

Commit Message

Marek Szyprowski Oct. 5, 2023, 10:43 a.m. UTC
  Add the needed device-tree compatible string to the MAX77843 extcon
driver, so it can be automatically loaded when compiled as a kernel
module and given device-tree contains separate 'muic' node under the main
MAX77843 PMIC node.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 drivers/extcon/extcon-max77843.c | 6 ++++++
 1 file changed, 6 insertions(+)
  

Comments

Krzysztof Kozlowski Oct. 6, 2023, 6:41 a.m. UTC | #1
On 05/10/2023 12:43, Marek Szyprowski wrote:
> Add the needed device-tree compatible string to the MAX77843 extcon
> driver, so it can be automatically loaded when compiled as a kernel
> module and given device-tree contains separate 'muic' node under the main
> MAX77843 PMIC node.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  drivers/extcon/extcon-max77843.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/extcon/extcon-max77843.c b/drivers/extcon/extcon-max77843.c
> index 1bc0426ce3f1..e04ebdda886a 100644
> --- a/drivers/extcon/extcon-max77843.c
> +++ b/drivers/extcon/extcon-max77843.c
> @@ -946,6 +946,12 @@ static const struct platform_device_id max77843_muic_id[] = {
>  };
>  MODULE_DEVICE_TABLE(platform, max77843_muic_id);
>  
> +static const struct of_device_id of_max77843_muic_dt_match[] = {
> +	{ .compatible = "maxim,max77843-muic", },
> +	{ /* sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(of, of_max77843_muic_dt_match);

As robot reports, there is indeed no user of it. :/ You need to include
it in driver OF table or add maybe_unused.

Best regards,
Krzysztof
  

Patch

diff --git a/drivers/extcon/extcon-max77843.c b/drivers/extcon/extcon-max77843.c
index 1bc0426ce3f1..e04ebdda886a 100644
--- a/drivers/extcon/extcon-max77843.c
+++ b/drivers/extcon/extcon-max77843.c
@@ -946,6 +946,12 @@  static const struct platform_device_id max77843_muic_id[] = {
 };
 MODULE_DEVICE_TABLE(platform, max77843_muic_id);
 
+static const struct of_device_id of_max77843_muic_dt_match[] = {
+	{ .compatible = "maxim,max77843-muic", },
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, of_max77843_muic_dt_match);
+
 static struct platform_driver max77843_muic_driver = {
 	.driver		= {
 		.name		= "max77843-muic",