devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ygardi@codeaurora.org
To: Rob Herring <robherring2@gmail.com>
Cc: Yaniv Gardi <ygardi@codeaurora.org>,
	Jej B <james.bottomley@hansenpartnership.com>,
	Paul Bolle <pebolle@tiscali.nl>,
	hch@infradead.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	linux-scsi@vger.kernel.org,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Santosh Y <santoshsy@gmail.com>,
	linux-scsi-owner@vger.kernel.org,
	Subhash Jadavani <subhashj@codeaurora.org>,
	Gilad Broner <gbroner@codeaurora.org>,
	Dolev Raviv <draviv@codeaurora.org>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Vinayak Holikatti <vinholikatti@gmail.com>,
	"James E.J. Bottomley" <jbottomley@odin.com>,
	Christoph Hellwig <hch@lst.de>,
	Sujit Reddy Thumma <sthumma@codeaurora.org>,
	Raviv Shvili <rshvili@codeaur>
Subject: Re: [PATCH v4 6/8] scsi: ufs: make the UFS variant a platform device
Date: Wed, 2 Sep 2015 08:18:09 -0000	[thread overview]
Message-ID: <dd0c8afc696db852e57b7559eb6361df.squirrel@www.codeaurora.org> (raw)
In-Reply-To: <CAL_JsqJ2w3Czutb7vkT5Mt0Fs5jG_Lsm82-SD0Oe511X5-68Eg@mail.gmail.com>

> 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?

skipped my eye. i'm uploading another version without this redundant check

>
>> +       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-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



      reply	other threads:[~2015-09-02  8:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1440946354-16071-1-git-send-email-ygardi@codeaurora.org>
2015-08-30 14:52 ` [PATCH v4 6/8] scsi: ufs: make the UFS variant a platform device Yaniv Gardi
     [not found]   ` <1440946354-16071-7-git-send-email-ygardi-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-09-01 20:43     ` Rob Herring
2015-09-02  8:18       ` ygardi [this message]

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=dd0c8afc696db852e57b7559eb6361df.squirrel@www.codeaurora.org \
    --to=ygardi@codeaurora.org \
    --cc=draviv@codeaurora.org \
    --cc=galak@codeaurora.org \
    --cc=gbroner@codeaurora.org \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=jbottomley@odin.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi-owner@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=pebolle@tiscali.nl \
    --cc=robh+dt@kernel.org \
    --cc=robherring2@gmail.com \
    --cc=rshvili@codeaur \
    --cc=santoshsy@gmail.com \
    --cc=sthumma@codeaurora.org \
    --cc=subhashj@codeaurora.org \
    --cc=vinholikatti@gmail.com \
    /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).