Skip to content

drivers: bcm2835_unicam: Disable trigger mode operation #4834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions drivers/media/platform/bcm2835/bcm2835-unicam.c
Original file line number Diff line number Diff line change
Expand Up @@ -983,11 +983,6 @@ static irqreturn_t unicam_isr(int irq, void *dev)
}
}

if (reg_read(unicam, UNICAM_ICTL) & UNICAM_FCM) {
/* Switch out of trigger mode if selected */
reg_write_field(unicam, UNICAM_ICTL, 1, UNICAM_TFC);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To someone who knows nothing about the subject matter, the 1 here is unexpected.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's hitting the trigger bit in the ICTL register. It's using UNICAM_TFC as the bitmask.

reg_write_field(unicam, UNICAM_ICTL, 0, UNICAM_FCM);
}
return IRQ_HANDLED;
}

Expand Down Expand Up @@ -2297,8 +2292,7 @@ static void unicam_start_rx(struct unicam_device *dev, dma_addr_t *addr)

reg_write_field(dev, UNICAM_ANA, 0, UNICAM_DDL);

/* Always start in trigger frame capture mode (UNICAM_FCM set) */
val = UNICAM_FSIE | UNICAM_FEIE | UNICAM_FCM | UNICAM_IBOB;
val = UNICAM_FSIE | UNICAM_FEIE | UNICAM_IBOB;
set_field(&val, line_int_freq, UNICAM_LCIE_MASK);
reg_write(dev, UNICAM_ICTL, val);
reg_write(dev, UNICAM_STA, UNICAM_STA_MASK_ALL);
Expand Down Expand Up @@ -2411,12 +2405,6 @@ static void unicam_start_rx(struct unicam_device *dev, dma_addr_t *addr)
/* Load embedded data buffer pointers if needed */
if (dev->node[METADATA_PAD].streaming && dev->sensor_embedded_data)
reg_write_field(dev, UNICAM_DCS, 1, UNICAM_LDP);

/*
* Enable trigger only for the first frame to
* sync correctly to the FS from the source.
*/
reg_write_field(dev, UNICAM_ICTL, 1, UNICAM_TFC);
}

static void unicam_disable(struct unicam_device *dev)
Expand Down