• Home
  • Raw
  • Download

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()
288 struct rcar_thermal_common *common = priv->common; in _rcar_thermal_irq_ctrl() local
292 spin_lock_irqsave(&common->lock, flags); in _rcar_thermal_irq_ctrl()
294 rcar_thermal_common_bset(common, INTMSK, mask, enable ? 0 : mask); in _rcar_thermal_irq_ctrl()
296 spin_unlock_irqrestore(&common->lock, flags); in _rcar_thermal_irq_ctrl()
333 struct rcar_thermal_common *common = data; in rcar_thermal_irq() local
338 spin_lock_irqsave(&common->lock, flags); in rcar_thermal_irq()
340 mask = rcar_thermal_common_read(common, INTMSK); in rcar_thermal_irq()
341 status = rcar_thermal_common_read(common, STR); in rcar_thermal_irq()
342 rcar_thermal_common_write(common, STR, 0x000F0F0F & mask); in rcar_thermal_irq()
344 spin_unlock_irqrestore(&common->lock, flags); in rcar_thermal_irq()
351 rcar_thermal_for_each_priv(priv, common) { in rcar_thermal_irq()
367 struct rcar_thermal_common *common; in rcar_thermal_probe() local
377 common = devm_kzalloc(dev, sizeof(*common), GFP_KERNEL); in rcar_thermal_probe()
378 if (!common) in rcar_thermal_probe()
381 INIT_LIST_HEAD(&common->head); in rcar_thermal_probe()
382 spin_lock_init(&common->lock); in rcar_thermal_probe()
383 common->dev = dev; in rcar_thermal_probe()
398 dev_name(dev), common); in rcar_thermal_probe()
408 common->base = devm_ioremap_resource(dev, res); in rcar_thermal_probe()
409 if (IS_ERR(common->base)) in rcar_thermal_probe()
410 return PTR_ERR(common->base); in rcar_thermal_probe()
432 priv->common = common; in rcar_thermal_probe()
452 list_move_tail(&priv->list, &common->head); in rcar_thermal_probe()
460 rcar_thermal_common_write(common, ENR, enr_bits); in rcar_thermal_probe()
462 platform_set_drvdata(pdev, common); in rcar_thermal_probe()
469 rcar_thermal_for_each_priv(priv, common) { in rcar_thermal_probe()
483 struct rcar_thermal_common *common = platform_get_drvdata(pdev); in rcar_thermal_remove() local
487 rcar_thermal_for_each_priv(priv, common) { in rcar_thermal_remove()