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.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to