lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 20 Dec 2018 13:48:56 +0200
From:   Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
To:     mazziesaccount@...il.com, matti.vaittinen@...rohmeurope.com
Cc:     sboyd@...nel.org, andy.gross@...aro.org, david.brown@...aro.org,
        mturquette@...libre.com, linux-clk@...r.kernel.org,
        linux-kernel@...r.kernel.org, matthias.bgg@...nel.org,
        heiko@...ech.de, mikko.mutanen@...rohmeurope.com,
        heikki.haikola@...rohmeurope.com
Subject: Regmap support for common clocks

Hello Mike, Stephen & All,

I am working with device drivers for some ROHM components. Recently I
clk did a driver for bd71837/bd71847 PMICs. The PMIC is connected using
i2c and contains a simple clk gate. If the connecting bus could be mmap'd
I would have used the clk-gate provided by common clk framework. But as
it is i2c I ended up making the driver and enable/disable functions myself.

I am now working with next PMIC - which once again has similar clk gate
in it. I could write new driver again - but it feels a bit stupid as it
would be mostly just a copy-paste of bd71837/bd71847 - driver.

I first thought of doing regmap based 'clk-gate, clk-div and clk-mux'.
But after some googling I found

https://patchwork.kernel.org/patch/5955831/
https://lore.kernel.org/lkml/1434464615-9080-1-git-send-email-matthias.bgg@gmail.com/

and reading comments makes me to assume there would be more...

Current way seems to be that we have vendor/platform specific sub
folders which all seem to more or less implement own regmap-based basic
clocks. (Well, I randonly skimmed through the qcom and meson subfolders
and aty least they did - I guess same holds with others).

I sure could create 'rohm' subfolder and build up the 'basic clocks
using regmap' there - and put ROHM component related drivers in it. But
that does feel really stupid. Maybe the series worked by Matthias (last
link in the mail) could be reworked - or maybe we could drop one of the
platform specific regmap implementatios from subfolder to generic
portion? I think that for example moving the

drivers/clk/qcom/clk-regmap.c to
drivers/clk/clk-regmap.c so that it could be used without enabling
qualcomm clk configs would be a good start.

Seeing the number of chips connected with i2c/spi/... increasing - and
seeing the comments from community when Matthias sent his patch series
- I'd say the basic clocks supporting regmap would be very welcome...

But maybe I am missing something? I would like to start working with the
clk driver for the new ROHM PMIC - but I would like to take sane
approach. Any good adviece on how to proceed?

Best Regards
	Matti Vaittinen


-- 
Matti Vaittinen
ROHM Semiconductors

~~~ "I don't think so," said Rene Descartes.  Just then, he vanished ~~~

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ