Lines Matching refs:common
60 struct rcar_thermal_common *common; member
69 #define rcar_thermal_for_each_priv(pos, common) \ argument
70 list_for_each_entry(pos, &common->head, list)
74 #define rcar_priv_to_dev(priv) ((priv)->common->dev)
75 #define rcar_has_irq_support(priv) ((priv)->common->base)
89 static u32 _rcar_thermal_common_read(struct rcar_thermal_common *common, in _rcar_thermal_common_read() argument
92 return ioread32(common->base + reg); in _rcar_thermal_common_read()
97 static void _rcar_thermal_common_write(struct rcar_thermal_common *common, in _rcar_thermal_common_write() argument
100 iowrite32(data, common->base + reg); in _rcar_thermal_common_write()
105 static void _rcar_thermal_common_bset(struct rcar_thermal_common *common, in _rcar_thermal_common_bset() argument
110 val = ioread32(common->base + reg); in _rcar_thermal_common_bset()
113 iowrite32(val, common->base + reg); in _rcar_thermal_common_bset()
287 struct rcar_thermal_common *common = priv->common; in _rcar_thermal_irq_ctrl() local
291 spin_lock_irqsave(&common->lock, flags); in _rcar_thermal_irq_ctrl()
293 rcar_thermal_common_bset(common, INTMSK, mask, enable ? 0 : mask); in _rcar_thermal_irq_ctrl()
295 spin_unlock_irqrestore(&common->lock, flags); in _rcar_thermal_irq_ctrl()
332 struct rcar_thermal_common *common = data; in rcar_thermal_irq() local
337 spin_lock_irqsave(&common->lock, flags); in rcar_thermal_irq()
339 mask = rcar_thermal_common_read(common, INTMSK); in rcar_thermal_irq()
340 status = rcar_thermal_common_read(common, STR); in rcar_thermal_irq()
341 rcar_thermal_common_write(common, STR, 0x000F0F0F & mask); in rcar_thermal_irq()
343 spin_unlock_irqrestore(&common->lock, flags); in rcar_thermal_irq()
350 rcar_thermal_for_each_priv(priv, common) { in rcar_thermal_irq()
366 struct rcar_thermal_common *common = platform_get_drvdata(pdev); in rcar_thermal_remove() local
370 rcar_thermal_for_each_priv(priv, common) { in rcar_thermal_remove()
384 struct rcar_thermal_common *common; in rcar_thermal_probe() local
394 common = devm_kzalloc(dev, sizeof(*common), GFP_KERNEL); in rcar_thermal_probe()
395 if (!common) in rcar_thermal_probe()
398 platform_set_drvdata(pdev, common); in rcar_thermal_probe()
400 INIT_LIST_HEAD(&common->head); in rcar_thermal_probe()
401 spin_lock_init(&common->lock); in rcar_thermal_probe()
402 common->dev = dev; in rcar_thermal_probe()
415 common->base = devm_ioremap_resource(dev, res); in rcar_thermal_probe()
416 if (IS_ERR(common->base)) in rcar_thermal_probe()
417 return PTR_ERR(common->base); in rcar_thermal_probe()
439 priv->common = common; in rcar_thermal_probe()
459 list_move_tail(&priv->list, &common->head); in rcar_thermal_probe()
468 dev_name(dev), common); in rcar_thermal_probe()
474 rcar_thermal_common_write(common, ENR, enr_bits); in rcar_thermal_probe()