Post Go back to editing

add sysfs trigger

Hi All!

I have a problems with add a new devices to the Linux system based on the BF532.

Now I want to add iio-sysfs-trigger for generate the clock for external IIO ADC.

I need to make the follow steps(as I see in the ... trig-sysfs site):

1) Add "SYSFS trigger" in the kernel configuration by the "menuconfig"

2) Add follow code to the board device file (*.c) :


static struct platform_deviceiio_sysfs_trigger = {
   .name      = "iio_sysfs_trigger",
   .id      = 0,
   .dev = {
      .platform_data = NULL,

static struct platform_device *board_devices[] __initdata = {

static int __init board_init(void)

   platform_add_devices(board_devices, ARRAY_SIZE(board_devices));


   return 0;

But this is only example for abstract platform.

How I should change this code for BF532 for correct work the sysfs-trigger.

I mean what declarated function(for replace "platform_add_devices()" in example) and struct(for replace "platform device" in example) I should use for add new device to the system.

I think asnwer will helpfull for all peoples who has a problem to add any new devices to the platform.