Faking SD-Card insertion/removel

sougata santra sougata.santra at gmail.com
Fri Jun 1 06:34:38 EDT 2012


I have added a kset object 'slot' to platform device, with has all the
platform device as kobjects with attribute power associated to each of
them. So when that power attribute gets modified. I want to remove the
device. Something similar to fakephp module. Currently I call


When from the callback when the power attribute is written as 0. That
completely frees all the memory allocated for the the device. But what I
want to achieve is something similar to.

pci_remove_bus_device((struct pci_dev *)data);

Thanks in advance for any help if possible.

Best regards,

On Mon, May 28, 2012 at 5:27 PM, sougata santra <sougata.santra at gmail.com>wrote:

> I am new to linux device-drivers. I am trying to fake add, remove sd cards
> while they are mounted. For systems where sd card controller is connected
> to PCI bus. I can use fakephp to remove the controller itself. Can similar
> thing be done with "mmc" bus_type. So that I can fake card addition and
> removal. The current version of fakephp does not use anything from
> pci-hotplug subsystem. Is something similar possible ?.
> Thank you in advance.
> Best regards,
>      Sougata.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120601/9813b7ea/attachment.html 

More information about the Kernelnewbies mailing list