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


Groups > linux.kernel > #1304529

Re: [rtc-linux] [PATCH 2/6] mfd: max77620: add core driver for MAX77620/MAX20024

From Krzysztof Kozlowski <k.kozlowski@samsung.com>
Newsgroups linux.kernel
Subject Re: [rtc-linux] [PATCH 2/6] mfd: max77620: add core driver for MAX77620/MAX20024
Date 2016-01-08 14:20 +0100
Message-ID <qOF7s-7eQ-41@gated-at.bofh.it> (permalink)
References <qOk30-YY-11@gated-at.bofh.it> <qOk31-YY-49@gated-at.bofh.it> <qOuc3-7Ww-33@gated-at.bofh.it> <qOBwS-4Lq-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


W dniu 08.01.2016 o 18:16, Laxman Dewangan pisze:
> Hi Krzysztof,
> Thanks for review.
> I will fix most of your comment on my next patch.
> 
> Answering to some of comment/query.
> 
> On Friday 08 January 2016 07:05 AM, Krzysztof Kozlowski wrote:
>> ()2016-01-07 23:38 GMT+09:00 Laxman Dewangan <ldewangan@nvidia.com>:
>> +                               dev_err(dev,
>> +                                   "FPS enable-input %u is not
>> supported\n",
>> +                                       pval);
>> Indentation of arguments does not seem equal here or maybe this is
>> just my email client. Have you run this through checkpatch? And
>> sparse? And coccicheck (that one definitely not because kbuild is
>> complaining)?
> I ran checkpatch before I sent.

Anyway please be sure that indentation is consistent.

> 
>> +               chip->rmap[i] = devm_regmap_init_i2c(chip->clients[i],
>> +               (const struct regmap_config
>> *)&max77620_regmap_config[i]);
>> Indentation looks weird here (or again this is my email client...).
>> The cast is even weirder?!? Why casting?
> There is some parameter difference for MAX77620 and MAX20024. I have
> only one structure for it and changing tun time so I have not define
> this structure as constant.
> Now API needs const type structure and hence casting it.

I don't quite get... usually there is no need of casting pointer to a
writable memory when function accepts pointer to const.

> 
> However, I have  define different structure for MAX77620 and MAX20024
> which are const type and hence no need to explicitly casting here. This
> will be in my next patch.

You mean v2? Okay, let's wait for that...

> 
> +static inline int max77620_reg_update(struct device *dev, int sid,
> +               unsigned int reg, unsigned int mask, unsigned int val)
> +{
> +       struct max77620_chip *chip = dev_get_drvdata(dev);
> +
> +       return regmap_update_bits(chip->rmap[sid], reg, mask, val);
> +}
> 
>> I think all these shouldn't be static inlines in header. Although some
>> of them are one-liners but rest are not. Let the compiler decide what
>> to do with these wrappers.
> 
> If I dont make inline from header then this will complain as unused
> static function on related C compilation if it is not used on C. This
> header included from all sub module driver and they are not using all
> these APIs.
> 
> To avoid compilation warning,  I need to use inline here.

Because this shouldn't be defined in header at the first place. Instead
define it in main MFD driver with EXPORT_SYMBOL() and put in headers
just declaration.

Best regards,
Krzysztof

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


Thread

[PATCH 0/6] Add support for MAXIM MAX77620/MAX20024 PMIC Laxman Dewangan <ldewangan@nvidia.com> - 2016-01-07 15:50 +0100
  [PATCH 5/6] rtc: max77620: add support for max77620/max20024 RTC driver Laxman Dewangan <ldewangan@nvidia.com> - 2016-01-07 15:50 +0100
    Re: [PATCH 5/6] rtc: max77620: add support for max77620/max20024 RTC  driver Linux Kernel <linuxkernelmails@gmail.com> - 2016-01-08 02:10 +0100
      Re: [PATCH 5/6] rtc: max77620: add support for max77620/max20024 RTC  driver Lee Jones <lee.jones@linaro.org> - 2016-01-11 06:50 +0100
        Re: [PATCH 5/6] rtc: max77620: add support for max77620/max20024 RTC driver Linus Walleij <linus.walleij@linaro.org> - 2016-01-14 10:10 +0100
    Re: [rtc-linux] [PATCH 5/6] rtc: max77620: add support for  max77620/max20024 RTC driver Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-01-08 03:10 +0100
      Re: [rtc-linux] [PATCH 5/6] rtc: max77620: add support for max77620/max20024  RTC driver Laxman Dewangan <ldewangan@nvidia.com> - 2016-01-08 11:40 +0100
        Re: [rtc-linux] [PATCH 5/6] rtc: max77620: add support for  max77620/max20024 RTC driver Mark Brown <broonie@kernel.org> - 2016-01-08 14:00 +0100
          Re: [rtc-linux] [PATCH 5/6] rtc: max77620: add support for max77620/max20024  RTC driver Laxman Dewangan <ldewangan@nvidia.com> - 2016-01-08 14:20 +0100
            Re: [rtc-linux] [PATCH 5/6] rtc: max77620: add support for  max77620/max20024 RTC driver Mark Brown <broonie@kernel.org> - 2016-01-08 14:40 +0100
              Re: [rtc-linux] [PATCH 5/6] rtc: max77620: add support for max77620/max20024  RTC driver Laxman Dewangan <ldewangan@nvidia.com> - 2016-01-08 14:50 +0100
                Re: [rtc-linux] [PATCH 5/6] rtc: max77620: add support for max77620/max20024  RTC driver Laxman Dewangan <ldewangan@nvidia.com> - 2016-01-11 14:30 +0100
                Re: [rtc-linux] [PATCH 5/6] rtc: max77620: add support for  max77620/max20024 RTC driver Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-01-11 17:10 +0100
                Re: [rtc-linux] [PATCH 5/6] rtc: max77620: add support for max77620/max20024  RTC driver Laxman Dewangan <ldewangan@nvidia.com> - 2016-01-11 18:20 +0100
                Re: [rtc-linux] [PATCH 5/6] rtc: max77620: add support for  max77620/max20024 RTC driver Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-01-12 01:20 +0100
                Re: [rtc-linux] [PATCH 5/6] rtc: max77620: add support for max77620/max20024  RTC driver Laxman Dewangan <ldewangan@nvidia.com> - 2016-01-12 03:50 +0100
                Re: [rtc-linux] [PATCH 5/6] rtc: max77620: add support for  max77620/max20024 RTC driver Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-01-12 05:00 +0100
        Re: [rtc-linux] [PATCH 5/6] rtc: max77620: add support for  max77620/max20024 RTC driver Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-01-08 14:10 +0100
          Re: [rtc-linux] [PATCH 5/6] rtc: max77620: add support for max77620/max20024  RTC driver Laxman Dewangan <ldewangan@nvidia.com> - 2016-01-08 14:30 +0100
  [PATCH 6/6] regulator: max77620: add regulator driver for max77620/max20024 Laxman Dewangan <ldewangan@nvidia.com> - 2016-01-07 16:00 +0100
    Re: [PATCH 6/6] regulator: max77620: add regulator driver for  max77620/max20024 Mark Brown <broonie@kernel.org> - 2016-01-10 13:50 +0100
      Re: [PATCH 6/6] regulator: max77620: add regulator driver for max77620/max20024 Laxman Dewangan <ldewangan@nvidia.com> - 2016-01-11 11:30 +0100
  [PATCH 1/6] DT: mfd: add device-tree binding doc fro PMIC max77620/max20024 Laxman Dewangan <ldewangan@nvidia.com> - 2016-01-07 16:00 +0100
    Re: [PATCH 1/6] DT: mfd: add device-tree binding doc fro PMIC  max77620/max20024 Rob Herring <robh@kernel.org> - 2016-01-08 00:20 +0100
      Re: [PATCH 1/6] DT: mfd: add device-tree binding doc fro PMIC max77620/max20024 Laxman Dewangan <ldewangan@nvidia.com> - 2016-01-08 07:20 +0100
        Re: [PATCH 1/6] DT: mfd: add device-tree binding doc fro PMIC max77620/max20024 Rob Herring <robh@kernel.org> - 2016-01-08 15:30 +0100
  Re: [rtc-linux] [PATCH 2/6] mfd: max77620: add core driver for MAX77620/MAX20024 Laxman Dewangan <ldewangan@nvidia.com> - 2016-01-08 10:30 +0100
    Re: [rtc-linux] [PATCH 2/6] mfd: max77620: add core driver for  MAX77620/MAX20024 Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-01-08 14:20 +0100
      Re: [rtc-linux] [PATCH 2/6] mfd: max77620: add core driver for MAX77620/MAX20024 Laxman Dewangan <ldewangan@nvidia.com> - 2016-01-08 14:30 +0100
        Re: [rtc-linux] [PATCH 2/6] mfd: max77620: add core driver for MAX77620/MAX20024 Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-01-08 14:40 +0100
  Re: [rtc-linux] [PATCH 2/6] mfd: max77620: add core driver for  MAX77620/MAX20024 Lee Jones <lee.jones@linaro.org> - 2016-01-11 06:50 +0100
    Re: [rtc-linux] [PATCH 2/6] mfd: max77620: add core driver for  MAX77620/MAX20024 Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-01-11 07:30 +0100
      Re: [rtc-linux] [PATCH 2/6] mfd: max77620: add core driver for  MAX77620/MAX20024 Lee Jones <lee.jones@linaro.org> - 2016-01-11 10:10 +0100

csiph-web