From: Krzysztof Kozlowski <krzk@kernel.org>
To: Gairuboina Sirisha <sirisha.gairuboina@Ltts.com>,
linux-kernel@vger.kernel.org
Cc: lee@kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org
Subject: Re: [PATCH v1 3/3] drivers: misc: Add support for TPS65224 pfsm driver
Date: Fri, 27 Oct 2023 10:05:18 +0200 [thread overview]
Message-ID: <dc0852dc-8207-4195-a6ad-41792357aeda@kernel.org> (raw)
In-Reply-To: <20231026133226.290040-4-sirisha.gairuboina@Ltts.com>
On 26/10/2023 15:32, Gairuboina Sirisha wrote:
> From: Gairuboina Sirisha <sirisha.gairuboina@ltts.com>
>
> Added support for pmic nvm set FSM_I2C_TRIGGER functions driver,
> state control driver, Makefile and Kconfig
>
...
> +
> +static int tps65224_pfsm_probe(struct platform_device *pdev)
> +{
> + struct tps65224_pfsm *pfsm;
> + struct tps65224 *tps = dev_get_drvdata(pdev->dev.parent);
> + struct device *dev = &pdev->dev;
> + int irq;
> + int ret;
> + int i;
> +
> + pfsm = devm_kzalloc(dev, sizeof(struct tps65224_pfsm), GFP_KERNEL);
sizeof(*)
> + if (!pfsm)
> + return -ENOMEM;
> +
> + pfsm->regmap = tps->regmap;
> +
> + pfsm->miscdev.minor = MISC_DYNAMIC_MINOR;
> + pfsm->miscdev.name = devm_kasprintf(dev, GFP_KERNEL, "pfsm-%ld-0x%02x",
> + tps->chip_id, tps->reg);
> + pfsm->miscdev.fops = &tps65224_pfsm_fops;
> + pfsm->miscdev.parent = dev->parent;
> +
> + for (i = 0 ; i < pdev->num_resources ; i++) {
> + irq = platform_get_irq_byname(pdev, pdev->resource[i].name);
> + if (irq < 0)
> + return dev_err_probe(dev, irq, "Failed to get %s irq\n",
> + pdev->resource[i].name);
> +
> + ret = devm_request_threaded_irq(dev, irq, NULL,
> + tps65224_pfsm_isr, IRQF_ONESHOT,
> + pdev->resource[i].name, pdev);
> + if (ret)
> + return dev_err_probe(dev, ret, "Failed to request irq\n");
> + }
> +
> + platform_set_drvdata(pdev, pfsm);
> +
> + return misc_register(&pfsm->miscdev);
> +}
> +
> +static void tps65224_pfsm_remove(struct platform_device *pdev)
> +{
> + struct tps65224_pfsm *pfsm = platform_get_drvdata(pdev);
> +
> + misc_deregister(&pfsm->miscdev);
> +}
> +
> +static struct platform_driver tps65224_pfsm_driver = {
> + .driver = {
> + .name = "tps65224-pfsm",
> + },
> + .probe = tps65224_pfsm_probe,
> + .remove_new = tps65224_pfsm_remove,
> +};
> +
> +module_platform_driver(tps65224_pfsm_driver);
> +
> +MODULE_ALIAS("platform:tps65224-pfsm");
You should not need MODULE_ALIAS() in normal cases. If you need it,
usually it means your device ID table is wrong.
> +MODULE_AUTHOR("Gairuboina Sirisha <sirisha.gairuboina@ltts.com>");
> +MODULE_DESCRIPTION("TPS65224 Pre-configurable Finite State Machine Driver");
> +MODULE_LICENSE("GPL");
> diff --git a/include/uapi/linux/tps65224_pfsm.h b/include/uapi/linux/tps65224_pfsm.h
> new file mode 100644
> index 000000000000..c0a135903b5d
> --- /dev/null
> +++ b/include/uapi/linux/tps65224_pfsm.h
> @@ -0,0 +1,36 @@
> +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> +/*
> + * Userspace ABI for TPS65224 PMIC Pre-configurable Finite State Machine
> + *
> + * Copyright (C) 2015 Texas Instruments Incorporated - https://www.ti.com/
> + */
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-10-27 8:05 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-26 13:32 [PATCH v1 0/3] TPS65224 PMIC driver Gairuboina Sirisha
2023-10-26 13:32 ` [PATCH v1 1/3] drivers: mfd: Add support for TPS65224 Gairuboina Sirisha
2023-10-27 7:02 ` Greg KH
2023-11-07 11:40 ` Gairuboina Sirisha
2023-10-26 13:32 ` [PATCH v1 2/3] drivers: mfd: Add support for TPS65224 i2c driver Gairuboina Sirisha
2023-10-27 7:02 ` Greg KH
2023-11-07 11:42 ` Gairuboina Sirisha
2023-10-27 8:08 ` Krzysztof Kozlowski
2023-11-07 11:50 ` Gairuboina Sirisha
2023-10-26 13:32 ` [PATCH v1 3/3] drivers: misc: Add support for TPS65224 pfsm driver Gairuboina Sirisha
2023-10-27 7:05 ` Greg KH
2023-11-07 11:44 ` Gairuboina Sirisha
2023-10-27 8:05 ` Krzysztof Kozlowski [this message]
2023-11-07 11:48 ` Gairuboina Sirisha
2023-11-03 8:52 ` [PATCH v1 0/3] TPS65224 PMIC driver Julien Panis
2023-11-07 11:37 ` Gairuboina Sirisha
2023-11-08 9:19 ` Julien Panis
2023-11-09 16:22 ` Shree Ramamoorthy
2023-11-10 4:26 ` Greg KH
2023-11-10 20:07 ` [EXTERNAL] " Shree Ramamoorthy
2023-11-17 11:05 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dc0852dc-8207-4195-a6ad-41792357aeda@kernel.org \
--to=krzk@kernel.org \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sirisha.gairuboina@Ltts.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).