Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1263249

Re: [PATCH 4/7] mfd: hi655x: Add hi665x pmic driver

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 4/7] mfd: hi655x: Add hi665x pmic driver
Date 2015-11-05 15:40 +0100
Message-ID <qrtRL-7Tm-5@gated-at.bofh.it> (permalink)
References <qrsVH-7i3-9@gated-at.bofh.it> <qrt5n-7ln-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Thu, Nov 05, 2015 at 09:34:45PM +0800, Chen Feng wrote:

> +config MFD_HI655X_PMIC
> +        bool "HiSilicon Hi655X series PMU/Codec IC"

Why is this bool and not tristate?

> +        depends on ARCH_HISI

Can we have an || COMPILE_TEST here?

> +static irqreturn_t hi655x_pmic_irq_handler(int irq, void *data)
> +{
> +	struct hi655x_pmic *pmic = (struct hi655x_pmic *)data;
> +	u32 pending;
> +	u32 ret = IRQ_NONE;
> +	unsigned long offset;
> +	int i;

This looks like you should be able to use regmap_irq?

> +static int hi655x_pmic_remove(struct platform_device *pdev)
> +{
> +	struct device *dev = &pdev->dev;
> +	struct hi655x_pmic *pmic = platform_get_drvdata(pdev);
> +
> +	free_irq(pmic->irq, pmic);
> +	gpio_free(pmic->gpio);
> +	devm_release_mem_region(dev, pmic->res->start,
> +				resource_size(pmic->res));
> +	devm_kfree(dev, pmic);
> +	platform_set_drvdata(pdev, NULL);

There is no point in using devm_ cleanup functions in the device removal
path unless there's some ordering issue with respect to other stuff
which doesn't seem to be the case here.

> +static struct platform_driver hi655x_pmic_driver = {
> +	.driver	= {
> +		.name =	"hisi,hi655x-pmic",

We don't normally use OF style names in the Linux driver names.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 4/7] mfd: hi655x: Add hi665x pmic driver Chen Feng <puck.chen@hisilicon.com> - 2015-11-05 14:50 +0100
  Re: [PATCH 4/7] mfd: hi655x: Add hi665x pmic driver Mark Brown <broonie@kernel.org> - 2015-11-05 15:40 +0100
  Re: [PATCH 4/7] mfd: hi655x: Add hi665x pmic driver Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-11-06 21:30 +0100

csiph-web