All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jagath Jog J <jagathjog1996@gmail.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: alexandre.belloni@bootlin.com, a.zummo@towertech.it,
	robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v1 2/2] rtc: maxim: Add Maxim max31329 real time clock.
Date: Thu, 8 Sep 2022 01:07:28 +0530	[thread overview]
Message-ID: <CAM+2Eu+xzAPEwCoGsjM5sqKjOiT5J_-dzpeB-r5XP=KoRkSXGg@mail.gmail.com> (raw)
In-Reply-To: <3ad3fb30-d56f-78be-610d-a02c9609ba42@linaro.org>

Hi Krzysztof.
Thank you for reviewing.

On Mon, Sep 5, 2022 at 8:50 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 04/09/2022 06:47, Jagath Jog J wrote:
> > Add real time clock support for Maxim max31329 real time clock.
> >
> > Signed-off-by: Jagath Jog J <jagathjog1996@gmail.com>
>
> Thank you for your patch. There is something to discuss/improve.
>
> > +     max31329->rtc->ops = &max31329_rtc_ops;
> > +     max31329->irq = client->irq;
> > +     max31329->rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
> > +     max31329->rtc->range_max = RTC_TIMESTAMP_END_2199;
> > +     max31329->dev = &client->dev;
> > +
> > +     if (max31329->irq) {
> > +             ret = devm_request_threaded_irq(&client->dev, max31329->irq,
> > +                                             NULL, max31329_irq_handler,
> > +                                             IRQF_TRIGGER_LOW | IRQF_ONESHOT,
> > +                                             "max31329", &client->dev);
> > +             if (ret) {
> > +                     dev_err(&client->dev, "unable to request IRQ\n");
> > +                     max31329->irq = 0;
> > +                     return ret;
> > +             }
> > +
> > +             ret = regmap_write(max31329->regmap, MAX31329_RTC_CONFIG2_REG,
> > +                                MAX31329_RTC_CONFIG2_ENCLKO);
> > +             if (ret) {
> > +                     dev_err(&client->dev, "unable to configure INT pin");
> > +                     max31329->irq = 0;
> > +                     return ret;
> > +             }
> > +
> > +             device_set_wakeup_capable(&client->dev, true);
>
> Probably you should rather respect wakeup-source DT property.

Sure, I will configure wakeup based on the value of the wakeup-source
property from DT.

>
> > +             set_bit(RTC_FEATURE_ALARM, max31329->rtc->features);
> > +     }
> > +
> > +     ret = devm_rtc_register_device(max31329->rtc);
> > +     if (ret)
> > +             return ret;
> > +
> > +     max31329_trickle_config(&client->dev);
> > +
> > +     nvmem_cfg.priv = max31329->regmap;
> > +     devm_rtc_nvmem_register(max31329->rtc, &nvmem_cfg);
> > +
> > +#ifdef CONFIG_COMMON_CLK
> > +     max31329_clkout_register_clk(max31329, client);
> > +#endif
> > +
> > +     return 0;
> > +}
> > +
> > +static const struct of_device_id max31329_of_match[] = {
> > +     { .compatible = "maxim,max31329", },
> > +     { }
> > +};
> > +MODULE_DEVICE_TABLE(of, max31329_of_match);
> > +
> > +static struct i2c_driver max31329_driver = {
> > +     .driver = {
> > +             .name = "rtc-max31329",
> > +             .of_match_table = of_match_ptr(max31329_of_match),
>
> of_match_ptr without maybe_unused on the table should cause compile test
> warnings. You need both or none.

I will correct this in the next patch series.

Thank you
Jagath
>
>
> Best regards,
> Krzysztof

  reply	other threads:[~2022-09-07 19:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-04  4:47 [PATCH v1 0/2] rtc: add Maxim max31329 real time clock Jagath Jog J
2022-09-04  4:47 ` [PATCH v1 1/2] dt-bindings: rtc: add Maxim max31329 rtc device tree bindings Jagath Jog J
2022-09-05 15:18   ` Krzysztof Kozlowski
2022-09-04  4:47 ` [PATCH v1 2/2] rtc: maxim: Add Maxim max31329 real time clock Jagath Jog J
2022-09-05 15:20   ` Krzysztof Kozlowski
2022-09-07 19:37     ` Jagath Jog J [this message]
2022-09-06 14:54   ` kernel test robot
2022-09-10 22:37 kernel test robot
2022-09-13  9:09 ` Dan Carpenter
2022-09-13  9:09 ` Dan Carpenter

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='CAM+2Eu+xzAPEwCoGsjM5sqKjOiT5J_-dzpeB-r5XP=KoRkSXGg@mail.gmail.com' \
    --to=jagathjog1996@gmail.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.