lkml.org 
[lkml]   [2020]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 1/4] drivers: clk: qcom: Add msm8992 GCC driver
    From
    Date
    On 31/05/2020 18:46, Konrad Dybcio wrote:

    > +static struct clk_fixed_factor xo = {
    > + .mult = 1,
    > + .div = 1,
    > + .hw.init = &(struct clk_init_data)
    > + {
    > + .name = "xo",
    > + .parent_names = (const char *[]) { "xo_board" },
    > + .num_parents = 1,
    > + .ops = &clk_fixed_factor_ops,
    > + },
    > +};

    I think you can drop that, and use the DTS definition.

    xo_board: xo_board {
    compatible = "fixed-clock";
    #clock-cells = <0>;
    clock-frequency = <19200000>;
    };

    sleep_clk: sleep_clk {
    compatible = "fixed-clock";
    #clock-cells = <0>;
    clock-frequency = <32768>;
    };

    clock_gcc: clock-controller@fc400000 {
    compatible = "qcom,gcc-msm8994";
    #clock-cells = <1>;
    #reset-cells = <1>;
    #power-domain-cells = <1>;
    reg = <0xfc400000 0x2000>;

    + clock-names = "xo",
    + "sleep_clk";
    + clocks = <&xo_board>,
    + <&sleep_clk>;

    };


    > +static int gcc_msm8992_probe(struct platform_device *pdev)
    > +{
    > + struct device *dev = &pdev->dev;
    > + struct clk *clk;
    > +
    > + clk = devm_clk_register(dev, &xo.hw);
    > + if (IS_ERR(clk))
    > + return PTR_ERR(clk);

    You should drop this too.


    > +MODULE_ALIAS("platform:gcc-msm8992");

    and that.

    ---
    bod

    \
     
     \ /
      Last update: 2020-06-03 01:33    [W:2.751 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site