[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d0f4cf88-7799-6176-2336-7bdacbd2b621@linux.intel.com>
Date: Mon, 4 Nov 2019 08:35:52 -0600
From: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To: Vinod Koul <vkoul@...nel.org>
Cc: alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
tiwai@...e.de, broonie@...nel.org, gregkh@...uxfoundation.org,
jank@...ence.com, srinivas.kandagatla@...aro.org,
slawomir.blauciak@...el.com,
Bard liao <yung-chuan.liao@...ux.intel.com>,
Rander Wang <rander.wang@...ux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>,
Sanyog Kale <sanyog.r.kale@...el.com>
Subject: Re: [alsa-devel] [PATCH 06/14] soundwire: add support for
sdw_slave_type
On 11/3/19 12:32 AM, Vinod Koul wrote:
> On 23-10-19, 16:28, Pierre-Louis Bossart wrote:
>> Currently the bus does not have any explicit support for master
>> devices. Add explicit support for sdw_slave_type, so that in
>> follow-up patches we can add support for the sdw_md_type (md==Master
>> Device), following the Grey Bus example.
>>
>> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
>> ---
>> drivers/soundwire/bus_type.c | 9 ++++++++-
>> drivers/soundwire/slave.c | 7 ++++++-
>> include/linux/soundwire/sdw_type.h | 6 ++++++
>> 3 files changed, 20 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/soundwire/bus_type.c b/drivers/soundwire/bus_type.c
>> index 9a0fd3ee1014..5df095f4e12f 100644
>> --- a/drivers/soundwire/bus_type.c
>> +++ b/drivers/soundwire/bus_type.c
>> @@ -49,9 +49,16 @@ int sdw_slave_modalias(const struct sdw_slave *slave, char *buf, size_t size)
>>
>> static int sdw_uevent(struct device *dev, struct kobj_uevent_env *env)
>> {
>> - struct sdw_slave *slave = to_sdw_slave_device(dev);
>> + struct sdw_slave *slave;
>> char modalias[32];
>>
>> + if (is_sdw_slave(dev)) {
>> + slave = to_sdw_slave_device(dev);
>> + } else {
>> + dev_warn(dev, "uevent for unknown Soundwire type\n");
>> + return -EINVAL;
>
> when is the case where this would be triggered?
this is in preparation for the master case, where you will have 2 types
of devices, so need to check if the type is correct.
Powered by blists - more mailing lists