<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 8, 2014 at 11:02 PM, Greg Kroah-Hartman <span dir="ltr"><<a href="mailto:greg@kroah.com" target="_blank">greg@kroah.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Oct 08, 2014 at 10:23:32PM +0530, Jeshwanth Kumar N K wrote:<br>
> My case was: I have a hall sensor connected to Beaglebone black, And Userspace<br>
> needed a wakeup once the interrupt occur (example: every rising edge of GPIO).<br>
> Before that, the program will register (ioctl) the User space task pointer with<br>
> my kernel module, then my kernel module start sending signal for every<br>
> interrupt occur. We can consider roughly around 100 to 200 interrupts per<br>
> second maximum. ( I have not done this, but may be we can consider kernel will<br>
> get notified when userspace program stops. so that it will not send any<br>
> signal). So for this case, any other alternative implementation ?<br>
<br>
</span>select() on the GPIO sysfs file instead of a custom ioctl?<br>
<br>
And what do you do in userspace with that information?<br>
<br>
greg k-h<br>
</blockquote></div><br></div><div class="gmail_extra">With hall sensor input I can get the position of motor, and in userspace I drive the motor (brushless) for next position by passing the values to sysfs attribute of PWM driver. It's a closed loop, until I drive the PWM I will not get an interrupt. But what solution I had was, anyway PWM driver is available, my sensor driver sends the current position to the PWM driver (altered), then it will send to the motor directly (no need to user space intervention in driving PWM), But controlling through application in userspace like start/stop/speed etc. But I have not implemented and tested this. <br clear="all"></div><div class="gmail_extra"><br>-- <br><div dir="ltr"><div>Regards<br>Jeshwanth Kumar N K<br></div>Bangalore, India<br></div>
</div></div>