max_frame_time = <200>;
};
+ meson_irblaster: irblaster@14c {
+ compatible = "amlogic, meson_irblaster";
+ reg = <0x14c 0x10>,
+ <0x40 0x4>;
+ interrupts = <0 198 1>;
+ status = "disabled";
+ };
+
i2c_AO: i2c@5000 {
compatible = "amlogic,meson-i2c";
status = "disabled";
function = "uart_ao_b";
};
};
+
+ irblaster_pins:irblaster_pin {
+ mux {
+ groups = "remote_out_ao";
+ function = "remote_out_ao";
+ };
+ };
+
+ irblaster_pins1:irblaster_pin1 {
+ mux {
+ groups = "remote_out_ao9";
+ function = "remote_out_ao";
+ };
+ };
};
&pinctrl_periphs {
unsigned int hightime, unsigned int lowtime)
{
unsigned int count_delay;
+ unsigned int high_ct, low_ct;
unsigned int cycle = 1000 / (dev->carrier_freqs / 1000);
uint32_t val;
int n = 0;
int tb[3] = {
1, 10, 100
};
+
+ /*
+ *1. set mod_high_count = 13
+ *2. set mod_low_count = 13
+ *3. 60khz-8us, 38k-13us
+ */
+ high_ct = cycle * dev->duty_cycle / 100;
+ low_ct = cycle - high_ct;
+ writel((BLASTER_MODULATION_LOW_COUNT(low_ct - 1) |
+ BLASTER_MODULATION_HIGH_COUNT(high_ct - 1)),
+ dev->reg_base + AO_IR_BLASTER_ADDR1);
+
/*
hightime: modulator signal.
MODULATOR_TB:
send_all_data(dev);
ret = wait_for_completion_interruptible_timeout(
&dev->blaster_completion, msecs_to_jiffies(sum_time / 1000));
- if (ret)
+ if (!ret)
pr_err("failed to send all data\n");
return ret;
}