I was wondering how to define Petersson inner product for Hilbert modular forms. I had a discussion with my supervisor who vaguely suggested that in the case of elliptic modular forms the Petersson inner product should be thought of as being induced by the de Rham cup product, viewing modular forms as a subspace of $H^1_{dR}$ via the Hodge filtration. He also mentioned that this explains the need to take complex conjugate of the coefficients in $q$-expansion of $f$ while defining $\langle f, g \rangle$, as the space of modular forms is self-orthogonal with respect to the de Rham cup product.
Can someone provide a reference to the literature where this point of view is discussed?