Lines Matching refs:kcs_bmc

69 	struct kcs_bmc_device kcs_bmc;  member
82 static inline struct npcm7xx_kcs_bmc *to_npcm7xx_kcs_bmc(struct kcs_bmc_device *kcs_bmc) in to_npcm7xx_kcs_bmc() argument
84 return container_of(kcs_bmc, struct npcm7xx_kcs_bmc, kcs_bmc); in to_npcm7xx_kcs_bmc()
87 static u8 npcm7xx_kcs_inb(struct kcs_bmc_device *kcs_bmc, u32 reg) in npcm7xx_kcs_inb() argument
89 struct npcm7xx_kcs_bmc *priv = to_npcm7xx_kcs_bmc(kcs_bmc); in npcm7xx_kcs_inb()
99 static void npcm7xx_kcs_outb(struct kcs_bmc_device *kcs_bmc, u32 reg, u8 data) in npcm7xx_kcs_outb() argument
101 struct npcm7xx_kcs_bmc *priv = to_npcm7xx_kcs_bmc(kcs_bmc); in npcm7xx_kcs_outb()
108 static void npcm7xx_kcs_updateb(struct kcs_bmc_device *kcs_bmc, u32 reg, u8 mask, u8 data) in npcm7xx_kcs_updateb() argument
110 struct npcm7xx_kcs_bmc *priv = to_npcm7xx_kcs_bmc(kcs_bmc); in npcm7xx_kcs_updateb()
117 static void npcm7xx_kcs_enable_channel(struct kcs_bmc_device *kcs_bmc, bool enable) in npcm7xx_kcs_enable_channel() argument
119 struct npcm7xx_kcs_bmc *priv = to_npcm7xx_kcs_bmc(kcs_bmc); in npcm7xx_kcs_enable_channel()
125 static void npcm7xx_kcs_irq_mask_update(struct kcs_bmc_device *kcs_bmc, u8 mask, u8 state) in npcm7xx_kcs_irq_mask_update() argument
127 struct npcm7xx_kcs_bmc *priv = to_npcm7xx_kcs_bmc(kcs_bmc); in npcm7xx_kcs_irq_mask_update()
140 struct kcs_bmc_device *kcs_bmc = arg; in npcm7xx_kcs_irq() local
142 return kcs_bmc_handle_event(kcs_bmc); in npcm7xx_kcs_irq()
145 static int npcm7xx_kcs_config_irq(struct kcs_bmc_device *kcs_bmc, in npcm7xx_kcs_config_irq() argument
156 dev_name(dev), kcs_bmc); in npcm7xx_kcs_config_irq()
170 struct kcs_bmc_device *kcs_bmc; in npcm7xx_kcs_probe() local
191 kcs_bmc = &priv->kcs_bmc; in npcm7xx_kcs_probe()
192 kcs_bmc->dev = &pdev->dev; in npcm7xx_kcs_probe()
193 kcs_bmc->channel = chan; in npcm7xx_kcs_probe()
194 kcs_bmc->ioreg.idr = priv->reg->dib; in npcm7xx_kcs_probe()
195 kcs_bmc->ioreg.odr = priv->reg->dob; in npcm7xx_kcs_probe()
196 kcs_bmc->ioreg.str = priv->reg->sts; in npcm7xx_kcs_probe()
197 kcs_bmc->ops = &npcm7xx_kcs_ops; in npcm7xx_kcs_probe()
201 rc = npcm7xx_kcs_config_irq(kcs_bmc, pdev); in npcm7xx_kcs_probe()
205 npcm7xx_kcs_irq_mask_update(kcs_bmc, (KCS_BMC_EVENT_TYPE_IBF | KCS_BMC_EVENT_TYPE_OBE), 0); in npcm7xx_kcs_probe()
206 npcm7xx_kcs_enable_channel(kcs_bmc, true); in npcm7xx_kcs_probe()
208 rc = kcs_bmc_add_device(kcs_bmc); in npcm7xx_kcs_probe()
210 dev_warn(&pdev->dev, "Failed to register channel %d: %d\n", kcs_bmc->channel, rc); in npcm7xx_kcs_probe()
216 kcs_bmc->ioreg.idr, kcs_bmc->ioreg.odr, kcs_bmc->ioreg.str); in npcm7xx_kcs_probe()
224 struct kcs_bmc_device *kcs_bmc = &priv->kcs_bmc; in npcm7xx_kcs_remove() local
226 kcs_bmc_remove_device(kcs_bmc); in npcm7xx_kcs_remove()
228 npcm7xx_kcs_enable_channel(kcs_bmc, false); in npcm7xx_kcs_remove()
229 npcm7xx_kcs_irq_mask_update(kcs_bmc, (KCS_BMC_EVENT_TYPE_IBF | KCS_BMC_EVENT_TYPE_OBE), 0); in npcm7xx_kcs_remove()