Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1217079
| From | Rob Herring <robherring2@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 6/8] scsi: ufs: make the UFS variant a platform device |
| Date | 2015-09-01 22:50 +0200 |
| Message-ID | <q40Fc-FI-17@gated-at.bofh.it> (permalink) |
| References | <q3cfo-3Il-3@gated-at.bofh.it> <q3cfo-3Il-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, Aug 30, 2015 at 9:52 AM, Yaniv Gardi <ygardi@codeaurora.org> wrote:
> This change turns the UFS variant (SCSI_UFS_QCOM) into a UFS
> a platform device.
> In order to do so a few additional changes are required:
> 1. The ufshcd-pltfrm is no longer serves as a platform device.
> Now it only serves as a group of platform APIs such as PM APIs
> (runtime suspend/resume, system suspend/resume etc), parsers of
> clocks, regulators and pm_levels from DT.
> 2. What used to be the old platform "probe" is now "only"
> a pltfrm_init() routine, that does exactly the same, but only
> being called by the new probe function of the UFS variant.
>
> Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
>
> ---
> Documentation/devicetree/bindings/ufs/ufs-qcom.txt | 57 ++++++++++++++
> .../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 4 +-
For the binding:
Reviewed-by: Rob Herring <robh@kernel.org>
A comment on the driver part still.
> diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
> index 329ac84..8027435 100644
> --- a/drivers/scsi/ufs/ufs-qcom.c
> +++ b/drivers/scsi/ufs/ufs-qcom.c
[...]
> +static int ufs_qcom_probe(struct platform_device *pdev)
> +{
> + int err;
> + struct device *dev = &pdev->dev;
> + struct ufs_hba *hba;
> +
> + /* Perform generic probe */
> + err = ufshcd_pltfrm_init(pdev, &ufs_hba_qcom_vops);
> + if (err) {
> + dev_err(dev, "ufshcd_pltfrm_init() failed %d\n", err);
> + goto out;
> + }
> +
> + hba = platform_get_drvdata(pdev);
I thought this was not necessary?
> + if (unlikely(!hba)) {
> + dev_err(dev, "no hba structure after successful probing\n");
> + goto dealloc_host;
> + }
> +
> + return 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 6/8] scsi: ufs: make the UFS variant a platform device Yaniv Gardi <ygardi@codeaurora.org> - 2015-08-30 17:00 +0200
Re: [PATCH v4 6/8] scsi: ufs: make the UFS variant a platform device Rob Herring <robherring2@gmail.com> - 2015-09-01 22:50 +0200
Re: [PATCH v4 6/8] scsi: ufs: make the UFS variant a platform device ygardi@codeaurora.org - 2015-09-02 10:20 +0200
csiph-web