From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Joao Pinto <Joao.Pinto-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
Cc: vinholikatti-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
julian.calaby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
gbroner-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
subhashj-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
CARLOS.PALMINHA-HKixBCOQz3hWk0Htik3J/w@public.gmane.org,
ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v10 5/6] add TC G210 platform driver
Date: Fri, 04 Mar 2016 22:12:45 +0100 [thread overview]
Message-ID: <2253265.cRVI7LPIKe@wuerfel> (raw)
In-Reply-To: <cc5666f44c532b31dee1a1c8d12157173e69f9e2.1457111366.git.jpinto-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
On Friday 04 March 2016 17:22:18 Joao Pinto wrote:
> This patch adds a glue platform driver for the Synopsys G210 Test Chip.
>
> Signed-off-by: Joao Pinto <jpinto-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
Looks basically ok, but I think it can be simplified a little:
> +/**
> + * struct ufs_hba_dwc_vops - UFS DWC specific variant operations
> + */
> +static struct ufs_hba_variant_ops tc_dwc_g210_pltfm_hba_vops = {
> + .name = "tc-dwc-g210-pltfm",
> + .link_startup_notify = ufshcd_dwc_link_startup_notify,
> +};
> +
> +/**
> + * tc_dwc_g210_pltfm_probe()
> + * @pdev: pointer to platform device structure
> + *
> + */
> +static int tc_dwc_g210_pltfm_probe(struct platform_device *pdev)
> +{
> + int err;
> + struct device *dev = &pdev->dev;
> + struct device_node *np = dev->of_node;
> +
> + /* Check Test Chip type and set the specific setup routine */
> + if (of_device_is_compatible(np, "snps, g210-tc-6.00-20bit")) {
> + tc_dwc_g210_pltfm_hba_vops.custom_phy_initialization =
> + tc_dwc_g210_config_20_bit;
> + } else if (of_device_is_compatible(np, "snps, g210-tc-6.00-40bit")) {
> + tc_dwc_g210_pltfm_hba_vops.custom_phy_initialization =
> + tc_dwc_g210_config_40_bit;
> + }
Instead of manually checking the compatible string, define two copies
of the ufs_hba_variant_ops, and put a pointer to them into the
.data field of tc_dwc_g210_pltfm_match.
Arnd
--
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
next prev parent reply other threads:[~2016-03-04 21:12 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-04 17:22 [PATCH v10 0/6] add support for DWC UFS Controller Joao Pinto
2016-03-04 17:22 ` [PATCH v10 1/6] fixed typo in ufshcd-pltfrm Joao Pinto
[not found] ` <1c3427d2765381dca6d5ab1d50783b171babf50e.1457111366.git.jpinto-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-03-04 21:21 ` Arnd Bergmann
2016-03-04 17:22 ` [PATCH v10 2/6] added UFS 2.0 capabilities Joao Pinto
[not found] ` <fcc0aa6a294a02dcab590d56f7f43bcb2f9f18db.1457111366.git.jpinto-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-03-04 21:08 ` Arnd Bergmann
2016-03-17 11:52 ` Rob Herring
2016-03-17 12:49 ` [RESEND] [PATCH v11 " Rob Herring
2016-03-29 10:41 ` Winkler, Tomas
2016-03-29 11:08 ` Joao Pinto
2016-03-29 11:33 ` Winkler, Tomas
2016-03-29 11:53 ` Joao Pinto
2016-03-04 17:22 ` [PATCH v10 3/6] added support for DesignWare Controller Joao Pinto
[not found] ` <a2f0601b03aad273819e7a8da2a65664759e2889.1457111366.git.jpinto-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-03-04 21:09 ` Arnd Bergmann
2016-03-29 12:15 ` [RESEND] [PATCH v11 " Winkler, Tomas
[not found] ` <5B8DA87D05A7694D9FA63FD143655C1B541CD517-Jy8z56yoSI8MvF1YICWikbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-03-30 9:54 ` Joao Pinto
2016-03-04 17:22 ` [PATCH v10 4/6] added support for Synopsys G210 Test Chip Joao Pinto
[not found] ` <abbb0e8ee4eb17c9736c2f3bfeab51ff623b1381.1457111366.git.jpinto-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-03-04 21:10 ` Arnd Bergmann
2016-03-04 17:22 ` [PATCH v10 5/6] add TC G210 platform driver Joao Pinto
[not found] ` <cc5666f44c532b31dee1a1c8d12157173e69f9e2.1457111366.git.jpinto-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-03-04 21:12 ` Arnd Bergmann [this message]
2016-03-07 10:02 ` Joao Pinto
2016-03-04 17:22 ` [PATCH v10 6/6] add TC G210 pci driver Joao Pinto
[not found] ` <3602f942ffc8673942f4944f77a8a9d2c805c847.1457111366.git.jpinto-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-03-04 21:17 ` Arnd Bergmann
2016-03-07 11:03 ` Joao Pinto
[not found] ` <f12dcbcb9b83881a5f71460e2d6e1ab0f1e326d8.1457352207.git.jpinto@synopsys.com>
2016-03-07 12:09 ` [PATCH v11 5/6] add TC G210 platform driver Joao Pinto
2016-03-17 14:55 ` Rob Herring
2016-03-07 12:09 ` [PATCH v11 6/6] add-TC-G210-pci-driver Joao Pinto
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=2253265.cRVI7LPIKe@wuerfel \
--to=arnd-r2ngtmty4d4@public.gmane.org \
--cc=CARLOS.PALMINHA-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \
--cc=Joao.Pinto-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \
--cc=akinobu.mita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=gbroner-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=julian.calaby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=subhashj-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=vinholikatti-Re5JQEeQqe8AvxtiuMwx3w@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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).