Re: [PATCH 2/2] clk: vc5: Add support for IDT VersaClock 5P49V5935

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, Apr 4, 2017 at 3:21 PM, Marek Vasut <marek.vasut@xxxxxxxxx> wrote:
>On 04/04/2017 03:16 PM, Alexey Firago wrote:
>> +     switch (vc5->model) {
>> +     case IDT_VC5_5P49V5923:
>> +     case IDT_VC5_5P49V5933:
>> +             vc5->clk_fod_cnt = 2;
>> +             vc5->clk_out_cnt = 3;
>> +             break;
>> +     case IDT_VC5_5P49V5935:
>> +             vc5->clk_fod_cnt = 4;
>> +             vc5->clk_out_cnt = 5;
>> +             break;
>> +     default:
>> +             /* Should never go here */
>> +             dev_err(&client->dev, "unsupported IDT VC5 ID specified\n");
>> +             return -EINVAL;
>> +     }
>> +
>>       vc5->pin_xin = devm_clk_get(&client->dev, "xin");
>>       if (PTR_ERR(vc5->pin_xin) == -EPROBE_DEFER)
>>               return -EPROBE_DEFER;

>> @@ -744,7 +772,7 @@ static int vc5_probe(struct i2c_client *client,
>>       return 0;
>>
>>  err_clk:
>> -     if (vc5->model == IDT_VC5_5P49V5933)
>> +     if (vc5->model == IDT_VC5_5P49V5933 || vc5->model == IDT_VC5_5P49V5935)
>
> Maybe we should introduce some sort of flags to describe the VC
> properties instead of using the model all over the place ?

Yep, a structure describing the features (incl. fod_cnt and out_cnt), to be
pointed to by clk_vc5_of_match[].data.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux