Generic in­for­ma­tion

OpenSource For You - - DEVELOPERS LET'S TRY -

Probe in the driver gets called when­ever a de­vice's (al­ready regis­tered) name matches with the name of your plat­form driver (here, it is bcm-gpio). The sec­ond ma­jor func­tion­al­ity is ioctl which acts as a bridge be­tween the ap­pli­ca­tion space and your driver. In tech­ni­cal terms, when­ever your ap­pli­ca­tion in­vokes this ( ioctl) sys­tem call, the call will be routed to this func­tion of your driver. Once the call from the ap­pli­ca­tion is in your driver, you can process or pro­vide data inside the driver and can re­spond to the ap­pli­ca­tion.

The SoC datasheet, i.e., BCM2835-ARM-Pe­riph­er­als, plays a piv­otal role in build­ing up this driver. It con­sists of all the in­for­ma­tion per­tain­ing to the pe­riph­er­als sup­ported by your SoC. It ex­poses all the reg­is­ters rel­e­vant to a par­tic­u­lar pe­riph­eral, which is where the key is. Once you know what reg­is­ters of a pe­riph­eral are to be con­fig­ured, half the job is done. Be cau­tious about which ad­dress has to be used to ac­cess th­ese pe­riph­er­als.

Newspapers in English

Newspapers from India

© PressReader. All rights reserved.