Update source to Armbian-dev-202610.A311Y3
This commit is contained in:
@@ -101,6 +101,10 @@ to_meson_irblaster(struct irblaster_chip *chip)
|
||||
|
||||
static void blaster_initialize(struct meson_irblaster_dev *dev)
|
||||
{
|
||||
/*
|
||||
* upstream code: DIV_ROUND_CLOSEST
|
||||
*/
|
||||
// coverity[CONSTANT_EXPRESSION_RESULT]
|
||||
unsigned int carrier_cycle = DIV_ROUND_CLOSEST(1000,
|
||||
(dev->chip.state.freq / 1000));
|
||||
unsigned int high_ct, low_ct;
|
||||
@@ -144,6 +148,10 @@ static int write_to_fifo(struct meson_irblaster_dev *dev,
|
||||
unsigned int lowtime)
|
||||
{
|
||||
unsigned int count_delay;
|
||||
/*
|
||||
* upstream code: DIV_ROUND_CLOSEST
|
||||
*/
|
||||
// coverity[CONSTANT_EXPRESSION_RESULT]
|
||||
unsigned int cycle = DIV_ROUND_CLOSEST(1000,
|
||||
(dev->chip.state.freq / 1000));
|
||||
u32 val;
|
||||
@@ -207,6 +215,10 @@ static int write_to_high_fifo(struct meson_irblaster_dev *dev,
|
||||
unsigned int hightime)
|
||||
{
|
||||
unsigned int count_delay;
|
||||
/*
|
||||
* upstream code: DIV_ROUND_CLOSEST
|
||||
*/
|
||||
// coverity[CONSTANT_EXPRESSION_RESULT]
|
||||
unsigned int cycle = DIV_ROUND_CLOSEST(1000,
|
||||
(dev->chip.state.freq / 1000));
|
||||
u32 val;
|
||||
@@ -244,6 +256,10 @@ static void send_all_data(struct meson_irblaster_dev *dev)
|
||||
unsigned long flags;
|
||||
unsigned int cycle, max_time, high_ct, low_ct;
|
||||
|
||||
/*
|
||||
* upstream code: DIV_ROUND_CLOSEST
|
||||
*/
|
||||
// coverity[CONSTANT_EXPRESSION_RESULT]
|
||||
cycle = DIV_ROUND_CLOSEST(1000, (dev->chip.state.freq / 1000));
|
||||
high_ct = cycle * dev->chip.state.duty / 100;
|
||||
low_ct = cycle - high_ct;
|
||||
@@ -278,6 +294,9 @@ int meson_irblaster_send(struct irblaster_chip *chip,
|
||||
unsigned int high_ct, low_ct, cycle, long_len = 0;
|
||||
struct meson_irblaster_dev *irblaster_dev = to_meson_irblaster(chip);
|
||||
|
||||
if (!chip->dev)
|
||||
return -ENODEV;
|
||||
|
||||
pm_runtime_get_sync(chip->dev);
|
||||
init_completion(&irblaster_dev->blaster_completion);
|
||||
|
||||
@@ -286,6 +305,10 @@ int meson_irblaster_send(struct irblaster_chip *chip,
|
||||
* 2. set mod_low_count = 13
|
||||
* 3. 60khz-8us, 38k-13us
|
||||
*/
|
||||
/*
|
||||
* upstream code: DIV_ROUND_CLOSEST
|
||||
*/
|
||||
// coverity[CONSTANT_EXPRESSION_RESULT]
|
||||
cycle = DIV_ROUND_CLOSEST(1000,
|
||||
(irblaster_dev->chip.state.freq / 1000));
|
||||
high_ct = cycle * irblaster_dev->chip.state.duty / 100;
|
||||
@@ -380,6 +403,10 @@ static int meson_irblaster_probe(struct platform_device *pdev)
|
||||
if (!irblaster_dev)
|
||||
return -ENOMEM;
|
||||
|
||||
/*
|
||||
* upstream code: spin_lock_init
|
||||
*/
|
||||
// coverity[USELESS_CALL]
|
||||
spin_lock_init(&irblaster_dev->irblaster_lock);
|
||||
platform_set_drvdata(pdev, irblaster_dev);
|
||||
irblaster_dev->dev = &pdev->dev;
|
||||
|
||||
Reference in New Issue
Block a user