linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Nikula <jarkko.nikula@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-i2c@vger.kernel.org
Cc: Wolfram Sang <wsa@the-dreams.de>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	David Box <david.e.box@linux.intel.com>
Subject: Re: [PATCH 2/2] i2c: designware: Allow build Baytrail semaphore support when IOSF_MBI=m
Date: Thu, 10 Dec 2015 15:56:27 +0200	[thread overview]
Message-ID: <5669848B.2090502@linux.intel.com> (raw)
In-Reply-To: <1449752378.30729.89.camel@linux.intel.com>

On 12/10/2015 02:59 PM, Andy Shevchenko wrote:
> On Thu, 2015-12-10 at 13:48 +0200, Jarkko Nikula wrote:
>> I believe i2c-designware-baytrail.c doesn't have strict dependency
>> that
>> Intel SoC IOSF Sideband support must be always built-in in order to
>> be
>> able to compile support for Intel Baytrail I2C bus sharing HW
>> semaphore.
>>
>> Redefine build dependencies so that CONFIG_IOSF_MBI=y is required
>> only
>> when CONFIG_I2C_DESIGNWARE_PLATFORM is built-in.
>>
>> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
>> ---
>> Hi David. Can you ack/nak this patch as I'm not fully familiar with
>> this
>> HW semaphore can there be problems when IOSF_MBI is built as a
>> module.
>
>
>> At least I'm getting similar sensible looking "punit semaphore
>> acquired/held for x ms" debug messages when I modprobe/rmmod
>> i2c_designware_platform independently is the CONFIG_IOSF_MBI=y or =m.
>> ---
>>   drivers/i2c/busses/Kconfig | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
>> index 69c46fe13777..76f4d024def0 100644
>> --- a/drivers/i2c/busses/Kconfig
>> +++ b/drivers/i2c/busses/Kconfig
>> @@ -490,7 +490,9 @@ config I2C_DESIGNWARE_PCI
>>
>>   config I2C_DESIGNWARE_BAYTRAIL
>>   	bool "Intel Baytrail I2C semaphore support"
>> -	depends on I2C_DESIGNWARE_PLATFORM && IOSF_MBI=y && ACPI
>> +	depends on ACPI
>> +	depends on (I2C_DESIGNWARE_PLATFORM=m && IOSF_MBI) || \
>> +		   (I2C_DESIGNWARE_PLATFORM=y && IOSF_MBI=y)
>
> Would it be more readable in the following way
>
> depends on ACPI
> depends on I2C_DESIGNWARE_PLATFORM
> depends on IOSF_MBI if I2C_DESIGNWARE_PLATFORM=m
> depends on IOSF_MBI=y if I2C_DESIGNWARE_PLATFORM=y
>
For my eyes it looks a bit more complex but I think it's matter of 
taste. However, the syntax you are proposing is not supported for 
"depends on" like it is for "select" statements.

-- 
Jarkko

  reply	other threads:[~2015-12-10 13:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-10 11:48 [PATCH 1/2] i2c: designware: Keep pm_runtime_enable/_disable calls in sync Jarkko Nikula
2015-12-10 11:48 ` [PATCH 2/2] i2c: designware: Allow build Baytrail semaphore support when IOSF_MBI=m Jarkko Nikula
2015-12-10 12:59   ` Andy Shevchenko
2015-12-10 13:56     ` Jarkko Nikula [this message]
2016-01-04 19:51       ` Wolfram Sang
2016-01-05 22:21   ` David E. Box
2016-04-12 21:27     ` Wolfram Sang
2016-04-12 21:46   ` David E. Box
2016-06-19 17:31   ` Wolfram Sang
2015-12-12 17:06 ` [PATCH 1/2] i2c: designware: Keep pm_runtime_enable/_disable calls in sync Wolfram Sang

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=5669848B.2090502@linux.intel.com \
    --to=jarkko.nikula@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=david.e.box@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=wsa@the-dreams.de \
    /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).