From: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> To: Marek Vasut <marek.vasut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Cc: Alexey Firago <alexey_firago-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>, Michael Turquette <mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>, Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>, Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>, linux-clk <linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>, "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> Subject: Re: [PATCH 2/2] clk: vc5: Add support for IDT VersaClock 5P49V5935 Date: Tue, 4 Apr 2017 15:23:57 +0200 [thread overview] Message-ID: <CAMuHMdUOtY5i0_BoS7cKYzWKpA_fF3VssN4bZnNyFB117EpacQ@mail.gmail.com> (raw) In-Reply-To: <72c66927-0acf-c888-2b4b-906a6c27e15c-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> On Tue, Apr 4, 2017 at 3:21 PM, Marek Vasut <marek.vasut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org> To: Marek Vasut <marek.vasut@gmail.com> Cc: Alexey Firago <alexey_firago@mentor.com>, Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@codeaurora.org>, Rob Herring <robh+dt@kernel.org>, linux-clk <linux-clk@vger.kernel.org>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org> Subject: Re: [PATCH 2/2] clk: vc5: Add support for IDT VersaClock 5P49V5935 Date: Tue, 4 Apr 2017 15:23:57 +0200 [thread overview] Message-ID: <CAMuHMdUOtY5i0_BoS7cKYzWKpA_fF3VssN4bZnNyFB117EpacQ@mail.gmail.com> (raw) In-Reply-To: <72c66927-0acf-c888-2b4b-906a6c27e15c@gmail.com> On Tue, Apr 4, 2017 at 3:21 PM, Marek Vasut <marek.vasut@gmail.com> 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@linux-m68k.org 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
next prev parent reply other threads:[~2017-04-04 13:23 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-04-04 13:16 [PATCH 0/2] clk: Add support for IDT 5P49V5935 Alexey Firago 2017-04-04 13:16 ` Alexey Firago [not found] ` <1491311788-31905-1-git-send-email-alexey_firago-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> 2017-04-04 13:16 ` [PATCH 1/2] clk: vc5: Add bindings for IDT VersaClock 5P49V5935 Alexey Firago 2017-04-04 13:16 ` Alexey Firago 2017-04-04 13:16 ` [PATCH 2/2] clk: vc5: Add support " Alexey Firago 2017-04-04 13:16 ` Alexey Firago 2017-04-04 13:21 ` Marek Vasut [not found] ` <72c66927-0acf-c888-2b4b-906a6c27e15c-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2017-04-04 13:23 ` Geert Uytterhoeven [this message] 2017-04-04 13:23 ` Geert Uytterhoeven [not found] ` <CAMuHMdUOtY5i0_BoS7cKYzWKpA_fF3VssN4bZnNyFB117EpacQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2017-04-04 13:36 ` Alexey Firago 2017-04-04 13:36 ` Alexey Firago 2017-04-04 13:35 ` Alexey Firago 2017-04-04 13:35 ` Alexey Firago
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=CAMuHMdUOtY5i0_BoS7cKYzWKpA_fF3VssN4bZnNyFB117EpacQ@mail.gmail.com \ --to=geert-td1emuhucqxl1znqvxdv9g@public.gmane.org \ --cc=alexey_firago-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org \ --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=marek.vasut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \ --cc=mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \ --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \ --cc=sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.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: linkBe 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.