Hi Vitaly,
On Wed, Jul 28, 2010 at 10:47 PM, Vitaly Wool [off-list ref] wrote:
On Wed, Jul 21, 2010 at 7:33 PM, Ohad Ben-Cohen [off-list ref] wrote:
quoted
Add support to set/get mmc_host private embedded
data.
This is needed to allow software to dynamically
create (and remove) SDIO functions which represents
embedded SDIO devices.
<snip>
quoted
@@ -209,6 +209,8 @@ struct mmc_host { struct led_trigger *led; /* activity led */
#endif
+ void *embedded_data;
+
To my understanding, this data doesn't belong to mmc_host. It's not a
host data at all. E. g. imagine a GPIO IRQ for some SDIO chip -- it's
totally unrelated to host.
I think a cleaner way would be to introduce something similar to what
we have for SPI, e. g. struct sdio_board_info. This board info will
contain platform-specific stuff and vendor id/chip id for each onboard
SDIO device. Then the SDIO core will pick up the appropriate data
basing on vendor id/chip id.
Can you please elaborate some more about your proposal (specifically
where does this sdio_board_info get set and how do function drivers
access it) ?
If I understand you correctly, you suggest to have a global,
board-specific table of sdio_board_info structures, which would be
accessible to the SDIO core (through the host driver ?). When a new
SDIO device is found the core would search this table for the
appropriate sdio_board_info struct and make it accessible to the SDIO
function driver ?
Thanks,
Ohad.
~Vitaly