Re: [PATCH 4/5] IR: ene_ir: add support for carrier reports

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

 



On Fri, Oct 15, 2010 at 06:06:38PM +0200, Maxim Levitsky wrote:
> Signed-off-by: Maxim Levitsky <maximlevitsky@xxxxxxxxx>
> ---
>  drivers/media/IR/ene_ir.c |   37 +++++++++++++++++++++++++++++--------
>  1 files changed, 29 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/media/IR/ene_ir.c b/drivers/media/IR/ene_ir.c
> index 8639621..1962652 100644
> --- a/drivers/media/IR/ene_ir.c
> +++ b/drivers/media/IR/ene_ir.c
...
> @@ -209,13 +210,16 @@ void ene_rx_sense_carrier(struct ene_device *dev)
>  	dbg("RX: hardware carrier period = %02x", period);
>  	dbg("RX: hardware carrier pulse period = %02x", hperiod);
>  
> -
>  	carrier = 2000000 / period;
>  	duty_cycle = (hperiod * 100) / period;
>  	dbg("RX: sensed carrier = %d Hz, duty cycle %d%%",
> -							carrier, duty_cycle);
> -
> -	/* TODO: Send carrier & duty cycle to IR layer */
> +						carrier, duty_cycle);

Spacing is a bit odd here (random indent, no newline), but meh, looks sane
otherwise.

> +	if (dev->carrier_detect_enabled) {
> +		ev.carrier_report = true;
> +		ev.carrier = carrier;
> +		ev.duty_cycle = duty_cycle;
> +		ir_raw_event_store(dev->idev, &ev);
> +	}
>  }
>  
>  /* this enables/disables the CIR RX engine */

Acked-by: Jarod Wilson <jarod@xxxxxxxxxx>

-- 
Jarod Wilson
jarod@xxxxxxxxxx

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


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux