Hi Geert, Thanks for the feedback. > Subject: Re: [PATCH v2 1/3] clk: renesas: rzg2l: Add support for watchdog > reset selection > > Hi Biju, > > On Wed, Nov 17, 2021 at 9:21 AM Biju Das <biju.das.jz@xxxxxxxxxxxxxx> > wrote: > > On the, next version I am planning to introduce the below code for > > Reset selection based on device availability, instead of selecting all > > the channels. Is it the right way to do ? please let me know. > > > > node = of_find_node_by_name (NULL, NULL, "watchdog@12800800"); if > > (node && of_device_is_available(node) { > > // set reset selection for that channel > > of_node_put(node); > > } > > > > node = of_find_node_by_name (NULL, NULL, "watchdog@12800c00"); if > > (node && of_device_is_available(node) { > > // set reset selection for that channel > > of_node_put(node); > > } > > > > node = of_find_node_by_name (NULL, NULL, "watchdog@12800400"); if > > (node && of_device_is_available(node) { > > // set reset selection for that channel > > of_node_put(node); > > } > > Matching on node names is very fragile. Agreed. And what if the watchdog node is > enabled in DT, but the watchdog driver is not available? We will just configure, but since there is no watch driver available. I guess nothing will happen. > Moreover, this looks like it should not be controlled from the clock > driver, but from the watchdog driver instead. I have referred configure option from reset driver for R-Car, where WDT is configured in reset block as similar register is located in reset block rather the watchdog driver. May be I should not use Matching on node names, rather use bitmask of bits as you suggested. Please share your views. Regards, Biju