cregit-Linux how code gets into the kernel

Release 4.11 drivers/media/pci/tw5864/tw5864-util.c

#include "tw5864.h"


void tw5864_indir_writeb(struct tw5864_dev *dev, u16 addr, u8 data) { int retries = 30000; while (tw_readl(TW5864_IND_CTL) & BIT(31) && --retries) ; if (!retries) dev_err(&dev->pci->dev, "tw_indir_writel() retries exhausted before writing\n"); tw_writel(TW5864_IND_DATA, data); tw_writel(TW5864_IND_CTL, addr << 2 | TW5864_RW | TW5864_ENABLE); }

Contributors

PersonTokensPropCommitsCommitProp
Andrey Utkin74100.00%1100.00%
Total74100.00%1100.00%


u8 tw5864_indir_readb(struct tw5864_dev *dev, u16 addr) { int retries = 30000; while (tw_readl(TW5864_IND_CTL) & BIT(31) && --retries) ; if (!retries) dev_err(&dev->pci->dev, "tw_indir_readl() retries exhausted before reading\n"); tw_writel(TW5864_IND_CTL, addr << 2 | TW5864_ENABLE); retries = 30000; while (tw_readl(TW5864_IND_CTL) & BIT(31) && --retries) ; if (!retries) dev_err(&dev->pci->dev, "tw_indir_readl() retries exhausted at reading\n"); return tw_readl(TW5864_IND_DATA); }

Contributors

PersonTokensPropCommitsCommitProp
Andrey Utkin105100.00%1100.00%
Total105100.00%1100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Andrey Utkin182100.00%1100.00%
Total182100.00%1100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.