public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Autoselecting SPI for MEDIA_SUBDRV_AUTOSELECT?
@ 2014-08-22 15:00 Jeff Mahoney
  2014-08-22 15:17 ` Antti Palosaari
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Mahoney @ 2014-08-22 15:00 UTC (permalink / raw)
  To: Antti Palosaari, Mauro Carvalho Chehab, Linux Kernel Maling List

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Antti -

Commit e4462ffc160 ([media] Kconfig: sub-driver auto-select SPI bus)
enables CONFIG_SPI globally for a driver that won't even be enabled in
many cases.

Is there a reason USB_MSI2500 doesn't select SPI instead of
MEDIA_SUBDRV_AUTOSELECT?

- -Jeff

- -- 
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.19 (Darwin)

iQIcBAEBAgAGBQJT91smAAoJEB57S2MheeWytcQP/jVJNWUWQ414XaltxVyAF8XT
kyCCEXl/MslN8W36p6oMC6TX7KaXjQQSFVUltyt/UgcezuqhkU8nBUETEgLVou1n
1uF120zBu3gy3Hr+dG/3Awsdqb1UbrUrNM2LRL6sU5GIqYSdTxErL8inzXjj6/ow
MttC0yBf2aEumihLEfAqcmEPM0ryS9aZECEyclPA+KrYO9qJaicE2lg8JcSrg8yR
TyNYvRrQ2NOuh5thE4qDH/+jfwtZ4yuEXavIgLsZVuDL9+s11RsfOCxY6eLDPPer
qCI3r/2VYm4xMoF06FhOjafKvhhR97H4dm7jecW1zsGfwamrXMmB0+76IJkzxKpA
le7R5NHk9wag2d9zOLmWC2RQbAVspxV5idD/oq+6bSNLl2un89Pz2RMdZGln68db
z+Oz8W7OKhdQm7PyV2RhHNi67rcaGYt5m3fFkjp2RsylqZdQ7oO/zcMOiZxCxdqT
hGmsNXrgRDLoifA71BGrzyC2xmXYDzZ4K89W3msfW/h6TCNu1IWwqxs1qPucaHXk
xBXu5hn5+1sSmgDJAkg5ODum3hCt6PRdP54/D6hy4Ul9742HtBg5MzPEojSlqdLO
yF0ePAs7Ga8/xOGatCsz1aK8upFAOq6fvrakE2ibx5/0+Yyta9efR0X8q3oKskCr
Tc0Azhsxyhe1F/AObQW+
=7Eoh
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Autoselecting SPI for MEDIA_SUBDRV_AUTOSELECT?
  2014-08-22 15:00 Autoselecting SPI for MEDIA_SUBDRV_AUTOSELECT? Jeff Mahoney
@ 2014-08-22 15:17 ` Antti Palosaari
  2014-08-22 15:24   ` Jeff Mahoney
  2014-08-22 15:43   ` Mauro Carvalho Chehab
  0 siblings, 2 replies; 5+ messages in thread
From: Antti Palosaari @ 2014-08-22 15:17 UTC (permalink / raw)
  To: Jeff Mahoney, Mauro Carvalho Chehab, Linux Kernel Maling List,
	LMML

Moikka!

On 08/22/2014 06:00 PM, Jeff Mahoney wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Antti -
>
> Commit e4462ffc160 ([media] Kconfig: sub-driver auto-select SPI bus)
> enables CONFIG_SPI globally for a driver that won't even be enabled in
> many cases.
>
> Is there a reason USB_MSI2500 doesn't select SPI instead of
> MEDIA_SUBDRV_AUTOSELECT?

Nothing but I decided to set it similarly as I2C, another more common 
bus. IIRC same was for I2C_MUX too.

You could still disable media subdriver autoselect and then disable SPI 
and select all the media drivers (excluding MSSi2500) manually.

I have feeling that media auto-select was added to select everything 
needed for media.

regards
Antti

-- 
http://palosaari.fi/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Autoselecting SPI for MEDIA_SUBDRV_AUTOSELECT?
  2014-08-22 15:17 ` Antti Palosaari
@ 2014-08-22 15:24   ` Jeff Mahoney
  2014-08-22 15:25     ` Antti Palosaari
  2014-08-22 15:43   ` Mauro Carvalho Chehab
  1 sibling, 1 reply; 5+ messages in thread
From: Jeff Mahoney @ 2014-08-22 15:24 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: Mauro Carvalho Chehab, Linux Kernel Maling List, LMML

On Fri Aug 22 11:17:22 2014, Antti Palosaari wrote:
> Moikka!
>
> On 08/22/2014 06:00 PM, Jeff Mahoney wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi Antti -
>>
>> Commit e4462ffc160 ([media] Kconfig: sub-driver auto-select SPI bus)
>> enables CONFIG_SPI globally for a driver that won't even be enabled in
>> many cases.
>>
>> Is there a reason USB_MSI2500 doesn't select SPI instead of
>> MEDIA_SUBDRV_AUTOSELECT?
>
> Nothing but I decided to set it similarly as I2C, another more common
> bus. IIRC same was for I2C_MUX too.
>
> You could still disable media subdriver autoselect and then disable
> SPI and select all the media drivers (excluding MSSi2500) manually.
>
> I have feeling that media auto-select was added to select everything
> needed for media.

Ok, that makes sense. I suppose I'll still need to enable SPI just for 
this device and disable every other SPI device anyway. I'll live.

Thanks,

-Jeff

--
Jeff Mahoney
SUSE Labs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Autoselecting SPI for MEDIA_SUBDRV_AUTOSELECT?
  2014-08-22 15:24   ` Jeff Mahoney
@ 2014-08-22 15:25     ` Antti Palosaari
  0 siblings, 0 replies; 5+ messages in thread
From: Antti Palosaari @ 2014-08-22 15:25 UTC (permalink / raw)
  To: Jeff Mahoney; +Cc: Mauro Carvalho Chehab, Linux Kernel Maling List, LMML

On 08/22/2014 06:24 PM, Jeff Mahoney wrote:
> On Fri Aug 22 11:17:22 2014, Antti Palosaari wrote:
>> Moikka!
>>
>> On 08/22/2014 06:00 PM, Jeff Mahoney wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Hi Antti -
>>>
>>> Commit e4462ffc160 ([media] Kconfig: sub-driver auto-select SPI bus)
>>> enables CONFIG_SPI globally for a driver that won't even be enabled in
>>> many cases.
>>>
>>> Is there a reason USB_MSI2500 doesn't select SPI instead of
>>> MEDIA_SUBDRV_AUTOSELECT?
>>
>> Nothing but I decided to set it similarly as I2C, another more common
>> bus. IIRC same was for I2C_MUX too.
>>
>> You could still disable media subdriver autoselect and then disable
>> SPI and select all the media drivers (excluding MSSi2500) manually.
>>
>> I have feeling that media auto-select was added to select everything
>> needed for media.
>
> Ok, that makes sense. I suppose I'll still need to enable SPI just for
> this device and disable every other SPI device anyway. I'll live.

See drivers/media/Kconfig :

config MEDIA_SUBDRV_AUTOSELECT
	bool "Autoselect ancillary drivers (tuners, sensors, i2c, frontends)"
	depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || 
MEDIA_CAMERA_SUPPORT || MEDIA_SDR_SUPPORT
	depends on HAS_IOMEM
	select I2C
	select I2C_MUX
	select SPI
	default y
	help
	  By default, a media driver auto-selects all possible ancillary
	  devices such as tuners, sensors, video encoders/decoders and
	  frontends, that are used by any of the supported devices.

	  This is generally the right thing to do, except when there
	  are strict constraints with regards to the kernel size,
	  like on embedded systems.

	  Use this option with care, as deselecting ancillary drivers which
	  are, in fact, necessary will result in the lack of the needed
	  functionality for your device (it may not tune or may not have
	  the needed demodulators).

	  If unsure say Y.


regards
Antti

-- 
http://palosaari.fi/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Autoselecting SPI for MEDIA_SUBDRV_AUTOSELECT?
  2014-08-22 15:17 ` Antti Palosaari
  2014-08-22 15:24   ` Jeff Mahoney
@ 2014-08-22 15:43   ` Mauro Carvalho Chehab
  1 sibling, 0 replies; 5+ messages in thread
From: Mauro Carvalho Chehab @ 2014-08-22 15:43 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: Jeff Mahoney, Linux Kernel Maling List, LMML

Em Fri, 22 Aug 2014 18:17:22 +0300
Antti Palosaari <crope@iki.fi> escreveu:

> Moikka!
> 
> On 08/22/2014 06:00 PM, Jeff Mahoney wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hi Antti -
> >
> > Commit e4462ffc160 ([media] Kconfig: sub-driver auto-select SPI bus)
> > enables CONFIG_SPI globally for a driver that won't even be enabled in
> > many cases.
> >
> > Is there a reason USB_MSI2500 doesn't select SPI instead of
> > MEDIA_SUBDRV_AUTOSELECT?
> 
> Nothing but I decided to set it similarly as I2C, another more common 
> bus. IIRC same was for I2C_MUX too.
> 
> You could still disable media subdriver autoselect and then disable SPI 
> and select all the media drivers (excluding MSSi2500) manually.
> 
> I have feeling that media auto-select was added to select everything 
> needed for media.

No. Actually, it is meant to be used to select the features that are
needed for the devices that got selected.

Selecting I2C there is already a hack, as there are a couple of devices
that don't need it (like as102). Still, we're doing that, as there are
so few exceptions that, for the sake of cleaner Kconfig setup, it is
the best solution.

I2C_MUX is also a little of abuse today, as there are also few devices
that use it, but we should change it, as there are some good reasons
to stop using the current I2C gate control by an i2c_mux.

I don't think that selecting SPI belongs there. The best is to move it
to the very few drivers that use it.

Regards,
Mauro

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-22 15:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-22 15:00 Autoselecting SPI for MEDIA_SUBDRV_AUTOSELECT? Jeff Mahoney
2014-08-22 15:17 ` Antti Palosaari
2014-08-22 15:24   ` Jeff Mahoney
2014-08-22 15:25     ` Antti Palosaari
2014-08-22 15:43   ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox