Search Linux Wireless

Re: [PATCH] NFC: Add Core support to generate tag lost event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



HI Samuel,

2012/3/23 Samuel Ortiz <samuel@xxxxxxxxxx>:
> On Fri, 2012-03-23 at 14:11 -0300, Lauro Ramos Venancio wrote:
>> 2012/3/23 Eric Lapuyade <eric.lapuyade@xxxxxxxxxxxxxxx>:
>> > Some HW/drivers get notifications when a tag moves out of the radio field.
>> > This notification is now forwarded to user space through netlink.
>>
>> I think to put a timer in the NFC core is not the best solution for
>> this problem.
>> This solution is not suitable for devices that receive an event when
>> the tag moves out of the field.
> One more thing: If the device provides such capability, the driver can
> then call nfc_target_lost() directly, and not register a
> presence_check() ops. Without such an ops, the timer won't get started,
> obviously.
> presence_check() is for drivers that are limited to asking the firmware
> about the target being on the field or not.
>
 I am fine with this kind of solution. My concern is that, maybe, it
shouldn't be put in the core.
We should avoid having an event that is sometimes generated by the
device driver and sometimes generated by the core.
My suggestion is to make the check_presence the first helper function
in a "nfc-utils". The device drivers would be able to decide to use or
not the nfc-utils helpers. The nfc core would be cleaner and would be
easier to anyone understand what must be implemented in a new device
driver.
This is just a suggestion. I will no oppose if you decide to keep the
current implementation.

Regards,
Lauro
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux