Faking SD-Card insertion/removel
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.
Update: 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 platform_device_unregister(device); 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, Sougata. On Mon, May 28, 2012 at 5:27 PM, sougata santra <sougata.santra@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.
participants (1)
-
sougata santra