All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, vkoul@kernel.org
Cc: sanyog.r.kale@intel.com, yung-chuan.liao@linux.intel.com,
	linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org
Subject: Re: [PATCH v2 1/5] soundwire: qcom: add support to missing transport params
Date: Tue, 2 Mar 2021 08:29:31 -0600	[thread overview]
Message-ID: <06a687f6-e79c-9bad-32c2-ea61356f882e@linux.intel.com> (raw)
In-Reply-To: <31eca99d-9f84-e088-443b-9aae782c2df2@linaro.org>


>>>       for (i = 0; i < nports; i++) {
>>>           ctrl->pconfig[i].si = si[i];
>>>           ctrl->pconfig[i].off1 = off1[i];
>>>           ctrl->pconfig[i].off2 = off2[i];
>>>           ctrl->pconfig[i].bp_mode = bp_mode[i];
>>> +        ctrl->pconfig[i].hstart = hstart[i];
>>> +        ctrl->pconfig[i].hstop = hstop[i];
>>> +        ctrl->pconfig[i].word_length = word_length[i];
>>> +        ctrl->pconfig[i].blk_group_count = blk_group_count[i];
>>> +        ctrl->pconfig[i].lane_control = lane_control[i];
>>>       }
>>
>> I don't get why you test the values parsed from DT before writing the 
>> registers. Why do test them here? if some values are incorrect it's 
>> much better to provide an error log instead of writing a partially 
>> valid setup to hardware, no?
> 
> from DT we pass parameters for all the master ports, however some of 
> these parameters are not really applicable for some of the ports! so the 
> way we handle this is by marking them as 0xFF which means these values 
> are not applicable for those ports! Having said that I think I should 
> probably redefine SWR_INVALID_PARAM to QCOM_SWR_PARAM_NA or something on 
> those lines!

Humm, do you have an example here? It's a bit odd to define DT 
properties that may or may not be valid. If this is intentional and 
desired, this should still be captured somehow, e.g. in the bindings 
documentation or in the code with a comment, no?

  reply	other threads:[~2021-03-02 15:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-26 15:58 [PATCH v2 0/5] soundwire: qcom: various improvements Srinivas Kandagatla
2021-02-26 15:58 ` Srinivas Kandagatla
2021-02-26 15:58 ` [PATCH v2 1/5] soundwire: qcom: add support to missing transport params Srinivas Kandagatla
2021-02-26 15:58   ` Srinivas Kandagatla
2021-02-26 16:45   ` Pierre-Louis Bossart
2021-02-26 16:45     ` Pierre-Louis Bossart
2021-03-02 10:13     ` Srinivas Kandagatla
2021-03-02 10:13       ` Srinivas Kandagatla
2021-03-02 14:29       ` Pierre-Louis Bossart [this message]
2021-03-03  9:36         ` Srinivas Kandagatla
2021-03-03 16:16           ` Pierre-Louis Bossart
2021-02-26 15:58 ` [PATCH v2 2/5] soundwire: qcom: set continue execution flag for ignored commands Srinivas Kandagatla
2021-02-26 15:58   ` Srinivas Kandagatla
2021-02-26 15:58 ` [PATCH v2 3/5] soundwire: qcom: start the clock during initialization Srinivas Kandagatla
2021-02-26 15:58   ` Srinivas Kandagatla
2021-02-26 15:58 ` [PATCH v2 4/5] soundwire: qcom: update register read/write routine Srinivas Kandagatla
2021-02-26 15:58   ` Srinivas Kandagatla
2021-02-26 15:58 ` [PATCH v2 5/5] soundwire: qcom: add support to new interrupts Srinivas Kandagatla
2021-02-26 15:58   ` Srinivas Kandagatla

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=06a687f6-e79c-9bad-32c2-ea61356f882e@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sanyog.r.kale@intel.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.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 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.