lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231107114824.1067475-1-sirisha.gairuboina@Ltts.com>
Date:   Tue,  7 Nov 2023 17:18:24 +0530
From:   Gairuboina Sirisha <sirisha.gairuboina@...s.com>
To:     krzk@...nel.org
Cc:     arnd@...db.de, gregkh@...uxfoundation.org, lee@...nel.org,
        linux-kernel@...r.kernel.org, sirisha.gairuboina@...s.com,
        Gairuboina Sirisha <sirisha.gairuboina@...s.com>
Subject: Re: [PATCH v1 3/3] drivers: misc: Add support for TPS65224 pfsm driver

From: Gairuboina Sirisha <sirisha.gairuboina@...s.com>

> On 26/10/2023 15:32, Gairuboina Sirisha wrote:
> > From: Gairuboina Sirisha <sirisha.gairuboina@...s.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.

Thanks for your feedback. We will remove the same in the next patch version
as we don't have PMIC subset for now.

Thanks & Regards,
Sirisha G.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ